src/snac/server/database/DBUser.php
/**
     * Extend a session expires
     *
     * @param \snac\data\User $user A User
     *
     * @param integer $extend optional Optional number of seconds to extend the expires time. Defaults to
     * 3600.
     *
     * @return boolean True on success, else false.
     */
Extend a session expires
@param \snac\data\User $user A User

@param integer $extend optional Optional number of seconds to extend the expires time. Defaults to
3600.

@return boolean True on success, else false.
Extend a session expires @param \ snac \ data \ User $user A User @param integer $extend optional Optional number of seconds to extend the expires time . Defaults to 3600 . @return boolean True on success else false .
public function sessionExtend(&$user, $extend=3600)
    {
        $success = $this->sql->updateByExtendingSession($user->getUserID(),
                                                    $user->getToken()['access_token'],
                                                    $extend);
        if ($success === false)
            return false;
        $user->setToken(array(
            "access_token" => $user->getToken()["access_token"],
            "expires" => $this->sql->selectSession($user->getUserID(),
                                                   $user->getToken()["access_token"])));
        return true;
    }
public function sessionExtend ( & $ user , $ extend = 3600 ) { $ success = $ this -> sql -> updateByExtendingSession ( $ user -> getUserID ( ) , $ user -> getToken ( ) [ 'access_token' ] , $ extend ) ; if ( $ success === false ) return false ; $ user -> setToken ( array ( " access_token " => $ user -> getToken ( ) [ " access_token " ] , " expires " => $ this -> sql -> selectSession ( $ user -> getUserID ( ) , $ user -> getToken ( ) [ " access_token " ] ) ) ) ; return true ; }
Extend a session expires
 @param \snac\data\User $user A User
Extend a session expires @param \ snac \ data \ User $user A User
// Update the token for the user object