src/snac/server/database/DBUser.php
/**
     * Add a new session to the database
     *
     * Add a new session to the database using the token expiration from getToken(). Do nothing if the session
     * already exists. Return true if the session already exists.
     *
     * @param \snac\data\User $user User object
     *
     * @return boolean True if session add was successful, else false
     */
Add a new session to the database
Add a new session to the database using the token expiration from getToken(). Do nothing if the session
already exists. Return true if the session already exists.

@param \snac\data\User $user User object

@return boolean True if session add was successful, else false
Add a new session to the database Add a new session to the database using the token expiration from getToken () . Do nothing if the session already exists . Return true if the session already exists . @param \ snac \ data \ User $user User object @return boolean True if session add was successful else false
public function addSession($user)
    {
        if (! $this->sessionExists($user))
        {
            $currentToken = $user->getToken();
            $accessToken = $currentToken['access_token'];
            $expires = $currentToken['expires'];
            return $this->sql->insertSession($user->getUserID(), $accessToken, $expires);
        }
        return true; 
    }
public function addSession ( $ user ) { if ( ! $ this -> sessionExists ( $ user ) ) { $ currentToken = $ user -> getToken ( ) ; $ accessToken = $ currentToken [ 'access_token' ] ; $ expires = $ currentToken [ 'expires' ] ; return $ this -> sql -> insertSession ( $ user -> getUserID ( ) , $ accessToken , $ expires ) ; } return true ; }
Add a new session to the database
 Add a new session to the database using the token expiration from getToken().
Add a new session to the database Add a new session to the database using the token expiration from getToken () .
// Nothing added, but also no errors, so true is the return value.