src/snac/server/database/SQL.php
/**
     * Create a new session
     *
     * Create a new session for a user.
     *
     * @param integer $appUserID The user id
     *
     * @param string $accessToken A session token
     *
     * @param string $expires A session expiration timestamp
     *
     */
Create a new session
Create a new session for a user.

@param integer $appUserID The user id

@param string $accessToken A session token

@param string $expires A session expiration timestamp
Create a new session Create a new session for a user . @param integer $appUserID The user id @param string $accessToken A session token @param string $expires A session expiration timestamp
public function insertSession($appUserID, $accessToken, $expires)
    {
        $result = $this->sdb->query(
            'insert into session (appuser_fk, access_token, expires) values ($1, $2, $3) returning appuser_fk',
            array($appUserID, $accessToken, $expires));
        $row = $this->sdb->fetchrow($result);
        if ($row && array_key_exists('appuser_fk', $row))
        {
            return true;
        }
        return false;
    }
public function insertSession ( $ appUserID , $ accessToken , $ expires ) { $ result = $ this -> sdb -> query ( 'insert into session (appuser_fk, access_token, expires) values ($1, $2, $3) returning appuser_fk' , array ( $ appUserID , $ accessToken , $ expires ) ) ; $ row = $ this -> sdb -> fetchrow ( $ result ) ; if ( $ row && array_key_exists ( 'appuser_fk' , $ row ) ) { return true ; } return false ; }
Create a new session
 Create a new session for a user.
Create a new session Create a new session for a user .