Subversion Repositories SmartDukaan

Rev

Rev 34794 | Rev 35026 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34794 Rev 34815
Line 104... Line 104...
104
        authUser.setPassword(getHash256(password));
104
        authUser.setPassword(getHash256(password));
105
    }
105
    }
106
 
106
 
107
    @Override
107
    @Override
108
    public void resetPassword(String emailOrMobile, String password) throws ProfitMandiBusinessException {
108
    public void resetPassword(String emailOrMobile, String password) throws ProfitMandiBusinessException {
-
 
109
        try {
109
        AuthUser authUser = authRepository.selectByEmailOrMobile(emailOrMobile);
110
            AuthUser authUser = authRepository.selectByEmailOrMobile(emailOrMobile);
-
 
111
            authUser.setPassword(getHash256(password));
110
        userService.resetPassword(emailOrMobile, password);
112
            userService.resetPassword(emailOrMobile, password);
-
 
113
        } catch (ProfitMandiBusinessException e) {
111
        authUser.setPassword(getHash256(password));
114
            userService.resetPassword(emailOrMobile, password);
-
 
115
        }
112
    }
116
    }
113
 
117
 
114
    @Override
118
    @Override
115
    public void changePassword(String emailOrMobile, String oldPassword, String newPassword) throws ProfitMandiBusinessException {
119
    public void changePassword(String emailOrMobile, String oldPassword, String newPassword) throws ProfitMandiBusinessException {
116
        if (authRepository.authenticate(emailOrMobile, getHash256(oldPassword))) {
120
        if (authRepository.authenticate(emailOrMobile, getHash256(oldPassword))) {