Project

General

Profile

« Previous | Next » 

Revision fea31118

Added by Thomas Noël over 12 years ago

[ezldap] activate account on change password or change email actions

With this modification, a user can activate his account even if he did not
receive the first mail.

View differences:

extra/modules/ezldap_ui.ptl
225 225
        elif action == 'change_email':
226 226
            new_email = token_action.split(";")[1]
227 227
            mod_list = [(ldap.MOD_REPLACE, ezldap.LDAP_EMAIL, str(new_email)),
228
                    (ldap.MOD_REPLACE, 'actif', 'TRUE'),
228 229
                    (ldap.MOD_DELETE, 'token', None),
229 230
                    (ldap.MOD_DELETE, 'tokenAction', None),
230 231
                    (ldap.MOD_DELETE, 'tokenExpiration', None)]
......
236 237
            new_password = make_password()
237 238
            userPassword = ['{sha}%s' % base64.encodestring(sha(new_password).digest()).strip()]
238 239
            mod_list = [(ldap.MOD_REPLACE, 'userPassword', userPassword),
240
                    (ldap.MOD_REPLACE, 'actif', 'TRUE'),
239 241
                    (ldap.MOD_DELETE, 'token', None),
240 242
                    (ldap.MOD_DELETE, 'tokenAction', None),
241 243
                    (ldap.MOD_DELETE, 'tokenExpiration', None)]

Also available in: Unified diff