init commit
This commit is contained in:
parent
a09f95d619
commit
3b9322b929
14 changed files with 587 additions and 9 deletions
|
|
@ -57,6 +57,8 @@ from utils.hosting_utils import (
|
|||
from utils.mailer import BaseEmail
|
||||
from utils.stripe_utils import StripeUtils
|
||||
from utils.tasks import send_plain_email_task
|
||||
from utils.ldap_manager import LdapManager
|
||||
|
||||
from utils.views import (
|
||||
PasswordResetViewMixin, PasswordResetConfirmViewMixin, LoginViewMixin,
|
||||
ResendActivationLinkViewMixin
|
||||
|
|
@ -394,9 +396,12 @@ class PasswordResetConfirmView(HostingContextMixin,
|
|||
if user is not None and default_token_generator.check_token(user,
|
||||
token):
|
||||
if form.is_valid():
|
||||
ldap_manager = LdapManager()
|
||||
new_password = form.cleaned_data['new_password2']
|
||||
user.create_ldap_account()
|
||||
user.set_password(new_password)
|
||||
user.save()
|
||||
ldap_manager.change_password(user.username, user.password)
|
||||
messages.success(request, _('Password has been reset.'))
|
||||
|
||||
# Change opennebula password
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue