diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-05-10 16:38:09 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-05-10 16:38:09 +0100 |
commit | e0f04654af67eb27ac8e5876a4b39d0cde43f3cb (patch) | |
tree | 30778acf0f521931654b49403c0f1c030cb81ee7 | |
parent | de0c375add6b0780355d833b104ebf04333c4729 (diff) |
Don't remove /M tokens upon use.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Auth.pm | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm index 57b53a155..5a4243fbf 100644 --- a/perllib/FixMyStreet/App/Controller/Auth.pm +++ b/perllib/FixMyStreet/App/Controller/Auth.pm @@ -157,11 +157,8 @@ sub token : Path('/M') : Args(1) { # Sign out in case we are another user $c->logout(); - # get the email and scrap the token - my $data = $token_obj->data; - $token_obj->delete; - # find or create the user related to the token. + my $data = $token_obj->data; my $user = $c->model('DB::User')->find_or_create( { email => $data->{email} } ); $user->name( $data->{name} ) if $data->{name}; $user->password( $data->{password}, 1 ) if $data->{password}; |