public function getUserId()
    {
        if (! is_null($this->userId)) {
            return $this->userId;
        }

        $rooms = $this->room->getRooms($this->getSender());

        foreach ($rooms as $room) {
            if (count($explode = explode(static::USER_PREFIX, $room)) === 2) {
                $this->userId = $explode[1];
            }
        }

        return $this->userId;
    }
public function getUserId()
    {
        if (! is_null($this->userId)) {
            return $this->userId;
        }

        $rooms = $this->room->getRooms($this->getSender());

        foreach ($rooms as $room) {
            if (count($explode = explode(static::USER_PREFIX, $room)) === 2) {
                $this->userId = $explode[1];
            }
        }

        return $this->userId;
    }
public function getUserId ( ) { if ( ! is_null ( $ this -> userId ) ) { return $ this -> userId ; } $ rooms = $ this -> room -> getRooms ( $ this -> getSender ( ) ) ; foreach ( $ rooms as $ room ) { if ( count ( $ explode = explode ( static :: USER_PREFIX , $ room ) ) === 2 ) { $ this -> userId = $ explode [ 1 ] ; } } return $ this -> userId ; }
Get current auth user id by sender's fd.
Get current auth user id by sender s fd .