Forward port fix for no email address during username/email address password recovery.
This commit is contained in:
parent
7addce2dd6
commit
da10f64d29
3 changed files with 14 additions and 3 deletions
|
|
@ -13,6 +13,7 @@
|
|||
- fixed #4136: Shortcut doesn't display all properties in override
|
||||
- fixed #8838: Gallery Cross Publish template is broken
|
||||
- fixed #8898: versioning problem
|
||||
- fixed #9315: Password Recovery
|
||||
|
||||
7.6.6
|
||||
- fixed #8792: Image Preview gives ERROR in Collateral Manager
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ sub profileRecoverPasswordFinish {
|
|||
my $username;
|
||||
if ($self->getSetting('passwordRecoveryRequireUsername')) {
|
||||
$username = $self->session->form->process('authWebGUI.username');
|
||||
return $self->recoverPassword($i18n2->get('password recovery no username')) unless defined $username;
|
||||
return $self->recoverPassword($i18n->get('password recovery no username', 'AuthWebGUI')) unless defined $username;
|
||||
}
|
||||
|
||||
my @fields = @{WebGUI::ProfileField->getPasswordRecoveryFields($self->session)};
|
||||
|
|
@ -1011,7 +1011,6 @@ sub emailRecoverPasswordFinish {
|
|||
return $self->displayLogin unless ($self->session->setting->get('webguiPasswordRecovery') ne '') and $self->isVisitor;
|
||||
|
||||
my $i18n = WebGUI::International->new($self->session);
|
||||
my $i18n2 = WebGUI::International->new($self->session, 'AuthWebGUI');
|
||||
my $session = $self->session;
|
||||
my ($form) = $session->quick(qw/form/);
|
||||
my $email = $form->param('email');
|
||||
|
|
@ -1032,7 +1031,7 @@ sub emailRecoverPasswordFinish {
|
|||
|
||||
# Make sure the user is Active
|
||||
if ( $user->status ne "Active" ) {
|
||||
return $self->recoverPassword( $i18n2->get( 'password recovery disabled' ) );
|
||||
return $self->recoverPassword( $i18n->get( 'password recovery disabled', 'AuthWebGUI' ) );
|
||||
}
|
||||
|
||||
# generate information necessry to proceed
|
||||
|
|
@ -1041,6 +1040,10 @@ sub emailRecoverPasswordFinish {
|
|||
my $userId = $user->userId; #get the user guid
|
||||
$email = $user->profileField('email');
|
||||
|
||||
if ( ! $email ) {
|
||||
return $self->recoverPassword( $i18n->get( 'no email address', 'AuthWebGUI' ) );
|
||||
}
|
||||
|
||||
my $authsettings = $self->getParams($userId);
|
||||
$authsettings->{emailRecoverPasswordVerificationNumber} = $recoveryGuid;
|
||||
|
||||
|
|
|
|||
|
|
@ -724,6 +724,13 @@ our $I18N = {
|
|||
lastUpdated => 0,
|
||||
context => q{Error message when a user tries to recover password for a disabled account},
|
||||
},
|
||||
|
||||
'no email address' => {
|
||||
message => q{There is no email address registered for this account. Password recovery via email is not possible.},
|
||||
lastUpdated => 1229391388,
|
||||
context => q{Error message when a user tries to recover password and they don't have an email address},
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue