public function setPresence($id, $presence, $sessionId)
    {
        if ($this->isEmptyId($id)) {
            throw new InvalidArgumentException;
        }

        if (!in_array($presence, User::getPresences())) {
            throw new InvalidArgumentException;
        }

        if (!$sessionId) {
            throw new InvalidArgumentException;
        }

        $params = [
            'presence' => $presence,
            'session' => $sessionId
        ];

        $this->call('users/' . $id . '/setpresence', $params, 'post');
    }
public function setPresence($id, $presence, $sessionId)
    {
        if ($this->isEmptyId($id)) {
            throw new InvalidArgumentException;
        }

        if (!in_array($presence, User::getPresences())) {
            throw new InvalidArgumentException;
        }

        if (!$sessionId) {
            throw new InvalidArgumentException;
        }

        $params = [
            'presence' => $presence,
            'session' => $sessionId
        ];

        $this->call('users/' . $id . '/setpresence', $params, 'post');
    }
public function setPresence ( $ id , $ presence , $ sessionId ) { if ( $ this -> isEmptyId ( $ id ) ) { throw new InvalidArgumentException ; } if ( ! in_array ( $ presence , User :: getPresences ( ) ) ) { throw new InvalidArgumentException ; } if ( ! $ sessionId ) { throw new InvalidArgumentException ; } $ params = [ 'presence' => $ presence , 'session' => $ sessionId ] ; $ this -> call ( 'users/' . $ id . '/setpresence' , $ params , 'post' ) ; }
Set user status.

@param int $id - userId
@param string $presence - status
@param string $sessionId - session id

@throws InvalidArgumentException
@throws Exception
Set user status .