Skip to content

Commit

Permalink
Fix recover password
Browse files Browse the repository at this point in the history
  • Loading branch information
plu committed Jul 19, 2008
1 parent b663457 commit a681d7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,7 +1,8 @@
- Fix recover password (plu)
- Fix prefs button label
- Fix: /foo.photo/1 was broken (plu)
- Add new config option to enforce login:
<permissions>enforce_login 1</permissions>
<permissions>enforce_login 1</permissions> (plu)

0.999018 2008-07-16 19:45:00
- Fix selenium tests
Expand Down
7 changes: 4 additions & 3 deletions lib/MojoMojo/Controller/User.pm
Expand Up @@ -151,8 +151,9 @@ sub recover_pass : Global {
$c->flash->{message}='Could not recover password.';
return $c->res->redirect($c->uri_for('login'));
}
my $password:Stashed;
my $password : Stashed = '';
($password)=Crypt::PassGen::passgen(NLETT=>6,NWORDS=>1);
my $message:Stashed='';
if ($c->email(
header => [
From => $c->config->{system_mail},
Expand All @@ -163,9 +164,9 @@ sub recover_pass : Global {
)){
$user->pass($password);
$user->update();
my $message:Stashed='Emailed you your new password.';
$message = 'Emailed you your new password.';
} else {
my $message:Stashed='Error occurred while emailing you your new password.';
$message = 'Error occurred while emailing you your new password.';
}
$c->forward('login');
}
Expand Down

0 comments on commit a681d7f

Please sign in to comment.