 DELIMITER ;
 
 --
+-- Definition of procedure `SPUsersUpdatePasswordResetGuid`
+--
+
+DROP PROCEDURE IF EXISTS `SPUsersUpdatePasswordResetGuid`;
+
+DELIMITER $$
+
+/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
+CREATE DEFINER=`root`@`localhost` PROCEDURE `SPUsersUpdatePasswordResetGuid`(
+	param_UserId int
+	,param_PasswordResetGuid varchar(100)
+	,param_PasswordResetGuidExpireDate datetime
+)
+BEGIN
+UPDATE Users
+SET
+	PasswordResetGuid = param_PasswordResetGuid
+	,PasswordResetGuidExpireDate = param_PasswordResetGuidExpireDate
+WHERE
+	UserId = param_UserId;
+END $$
+/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$
+
+DELIMITER ;
+
+--
 -- Definition of view `messagescomplete`
 --
 

  `UserProvider` varchar(32) NOT NULL,
  `UserProviderId` varchar(64) NOT NULL,
  `UserProviderLastCall` datetime NOT NULL,
  PRIMARY KEY (`userid`),
  KEY `fk_users_usersgroups` (`usergroupid`),
  CONSTRAINT `fk_users_usersgroups` FOREIGN KEY (`usergroupid`) REFERENCES `usersgroups` (`usergroupid`)

DELIMITER ;

--
-- Definition of procedure `SPUsersGetByPasswordResetGuid`
--

DROP PROCEDURE IF EXISTS `SPUsersGetByPasswordResetGuid`;

DELIMITER $$

/*!50003 SET @TEMP_SQL_MODE=@@SQL_MODE, SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `SPUsersGetByPasswordResetGuid`(
	param_Provider varchar(32)
	,param_PasswordResetGuid varchar(64)
)
BEGIN
SELECT
	U.UserId
	,U.UserName
	,U.UserGroupId
	,U.UserGuid
	,U.UserTimeZone
	,U.UserExternalProfileUrl
	,U.UserProviderLastCall
	,U.UserEmail
	,U.UserProviderId
	,U.PasswordResetGuid
	,U.PasswordResetGuidExpireDate
FROM
	Users U
WHERE
	UserProvider = param_Provider
	AND
	PasswordResetGuid = param_PasswordResetGuid;
END $$
/*!50003 SET SESSION SQL_MODE=@TEMP_SQL_MODE */  $$

DELIMITER ;

--
-- Definition of procedure `SPUsersGetByProvider`
--

