diff --git a/code/authenticator/RESTfulAPI_TokenAuthenticator.php b/code/authenticator/RESTfulAPI_TokenAuthenticator.php index 5689ffe..7675fa9 100644 --- a/code/authenticator/RESTfulAPI_TokenAuthenticator.php +++ b/code/authenticator/RESTfulAPI_TokenAuthenticator.php @@ -217,7 +217,6 @@ public function lostPassword(SS_HTTPRequest $request) { $email = Convert::raw2sql($request->requestVar('email')); $member = DataObject::get_one('Member', "\"Email\" = '{$email}'"); - $sent = true; if ($member) { $token = $member->generateAutologinTokenAndStoreHash(); @@ -228,10 +227,10 @@ public function lostPassword(SS_HTTPRequest $request) 'PasswordResetLink' => Security::getPasswordResetLink($member, $token) )); $e->setTo($member->Email); - $sent = $e->send(); + $e->send(); } - return array( 'email' => $sent ); + return array( 'done' => true ); }