diff --git a/framework/web/User.php b/framework/web/User.php index 0f51f57470..3dd563a216 100644 --- a/framework/web/User.php +++ b/framework/web/User.php @@ -265,6 +265,7 @@ class User extends Component * This will remove authentication-related session data. * If `$destroySession` is true, all session data will be removed. * @param boolean $destroySession whether to destroy the whole session. Defaults to true. + * @return boolean whether the user is logged out */ public function logout($destroySession = true) { @@ -279,6 +280,7 @@ class User extends Component } $this->afterLogout($identity); } + return $this->getIsGuest(); } /**