示例#1
0
        public void StartDebugging(string username)
        {
            StopDebugging();

            var user = FindUser.Find(username);

            if (user == null)
            {
                return;
            }

            var result = LoginUser.Login(user, false);

            if (!result.Success)
            {
                return;
            }

            SiteDebugger.StartDebugging(DebugWebLoginUserKey);
        }
        public IWebGenerateUserResetPasswordResult Generate(string email)
        {
            var user = FindUser.Find(email);

            if (user == null)
            {
                return(CreateResult(WebGenerateUserResetPasswordStatus.UserNotFound));
            }

            var userResetPassword = GenerateUserResetPassword.Generate(user);

            if (userResetPassword == null)
            {
                return(CreateResult(WebGenerateUserResetPasswordStatus.Failure));
            }

            Actions.Process(userResetPassword);

            var result = CreateResult(WebGenerateUserResetPasswordStatus.Success);

            result.Token = userResetPassword.Token;

            return(result);
        }
示例#3
0
 public IUser Find(string username)
 {
     return(FindUserByEmail.Find(username));
 }
示例#4
0
 public bool IsExistingUser(string username)
 {
     return(FindUser.Find(username) != null);
 }