[Jifty-commit] jifty branch, master, updated. 309214972875649dc9282772d0c74e4f0b0d079e
Jifty commits
jifty-commit at lists.jifty.org
Wed Apr 21 20:26:23 EDT 2010
The branch, master has been updated
via 309214972875649dc9282772d0c74e4f0b0d079e (commit)
from 89418859e897f88d60c3dcb4562c1606a8c0ce19 (commit)
Summary of changes:
.../Password/Action/ResetLostPassword.pm | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 309214972875649dc9282772d0c74e4f0b0d079e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Apr 21 20:24:20 2010 -0400
Simplify the logic to get a user, with the superuser as the current user
This avoids a silent and confusing bug when a user can't read their
own email address.
diff --git a/lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm b/lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm
index aaf1e1f..2896a7d 100755
--- a/lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm
+++ b/lib/Jifty/Plugin/Authentication/Password/Action/ResetLostPassword.pm
@@ -48,14 +48,7 @@ Resets the password.
sub take_action {
my $self = shift;
- my $LoginUser = Jifty->app_class('Model', 'User');
- my $CurrentUser = Jifty->app_class('CurrentUser');
-
-
-
-
- my $u = $LoginUser->new( current_user => $CurrentUser->superuser );
- $u->load_by_cols( email => Jifty->web->current_user->user_object->email );
+ my $u = Jifty->web->current_user->user_object->as_superuser;
unless ($u) {
$self->result->error(
-----------------------------------------------------------------------
More information about the Jifty-commit
mailing list