private function _checkUserId($userId = null)
    {
        if (empty($userId) && $this->currentUser instanceof \Gems_User_User) {
            $userId = $this->currentUser->getUserId();
            if (0 === $userId) {
                $userId = null;
            }
        }
        return $userId;
    }
private function _checkUserId($userId = null)
    {
        if (empty($userId) && $this->currentUser instanceof \Gems_User_User) {
            $userId = $this->currentUser->getUserId();
            if (0 === $userId) {
                $userId = null;
            }
        }
        return $userId;
    }
private function _checkUserId ( $ userId = null ) { if ( empty ( $ userId ) && $ this -> currentUser instanceof \ Gems_User_User ) { $ userId = $ this -> currentUser -> getUserId ( ) ; if ( 0 === $ userId ) { $ userId = null ; } } return $ userId ; }
Replaces a null or empty userId with that of the current user

@param int $userId
@return int
Replaces a null or empty userId with that of the current user