Skip to content

Commit

Permalink
Remove side effects in User#isAuthenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
juvenn committed Nov 16, 2016
1 parent 71379af commit d556437
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/LeanCloud/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ public function isAuthenticated() {
return false;
}
try {
static::become($token);
$resp = Client::get("/users/me",
array("session_token" => $token));
} catch(CloudException $ex) {
if ($ex->getCode() === 211) {
return false;
Expand Down

0 comments on commit d556437

Please sign in to comment.