public function isAvailable()
    {
        if (!empty($this->adapter)) {
            // adapter is already etablished
            return true;
        }
        $user = $this->getUser();
        $sessionDataStored = $user->getAuthSession($this->providerKey);
        if (empty($sessionDataStored)) {
            // for this user no session has been stored
            return false;
        }
        $hybridAuth = $this->getHybridAuth();
        $hybridAuth->restoreSessionData($sessionDataStored);
        if ($hybridAuth->isConnectedWith($this->providerKey)) {
            return true;
        }
        return false;
    }
public function isAvailable()
    {
        if (!empty($this->adapter)) {
            // adapter is already etablished
            return true;
        }
        $user = $this->getUser();
        $sessionDataStored = $user->getAuthSession($this->providerKey);
        if (empty($sessionDataStored)) {
            // for this user no session has been stored
            return false;
        }
        $hybridAuth = $this->getHybridAuth();
        $hybridAuth->restoreSessionData($sessionDataStored);
        if ($hybridAuth->isConnectedWith($this->providerKey)) {
            return true;
        }
        return false;
    }
public function isAvailable ( ) { if ( ! empty ( $ this -> adapter ) ) { // adapter is already etablished return true ; } $ user = $ this -> getUser ( ) ; $ sessionDataStored = $ user -> getAuthSession ( $ this -> providerKey ) ; if ( empty ( $ sessionDataStored ) ) { // for this user no session has been stored return false ; } $ hybridAuth = $ this -> getHybridAuth ( ) ; $ hybridAuth -> restoreSessionData ( $ sessionDataStored ) ; if ( $ hybridAuth -> isConnectedWith ( $ this -> providerKey ) ) { return true ; } return false ; }
for backend there is only one possibility to get a connection,
and that is by stored Session
@return bool
for backend there is only one possibility to get a connection and that is by stored Session