/// <summary> /// Creates a token to allow resetting the user password /// </summary> /// <param name="siteAddress">Site address</param> /// <param name="userNameOrEmail">User name or Email address</param> /// <param name="hoursToExpire">Hours to expire the token from now</param> /// <returns>Token generated</returns> private string CreateResetPasswordToken(int siteAddressId, string userName, int hoursToExpire) { User u = FindUser(siteAddressId, userName); if (u != null) { return(_tokenizer.CreateToken(string.Format("{0},{1}", siteAddressId, userName))); } return(null); }