Beispiel #1
0
        public bool SendResetPasswordLink(string email)
        {
            string       token = GeneratePasswordResetToken();
            string       url   = "http://" + _hostname + "/User/PasswordReset?id=" + token;
            DatabaseUser user  = _dbQueryService.GetUserByEmailAddress(email);

            if (user == null)
            {
                return(false);
            }
            PasswordResetLink passwordResetLink = new PasswordResetLink(url, email, user.FirstName + " " + user.LastName);

            if (SendResetPasswordLink(passwordResetLink))
            {
                return(_dbQueryService.PersistPasswordResetToken(token, email));
            }
            else
            {
                return(false);
            }
        }