/** * Returns error code of last login operation * * @return int Error code */ public function login_error() { if ($this->login_error) { return $this->login_error; } if ($this->storage && $this->storage->get_error_code() < -1) { return self::ERROR_STORAGE; } }