public function normalizeUserId($userId)
    {
        if (is_numeric($userId)) {
            return $userId;
        }

        if (is_object($userId)) {
            return $userId->id;
        }

        if ($this->auth->check()) {
            return $this->auth->user()->id;
        }

        if (is_numeric($this->config->get('activitylog.defaultUserId'))) {
            return $this->config->get('activitylog.defaultUserId');
        };

        return '';
    }
public function normalizeUserId($userId)
    {
        if (is_numeric($userId)) {
            return $userId;
        }

        if (is_object($userId)) {
            return $userId->id;
        }

        if ($this->auth->check()) {
            return $this->auth->user()->id;
        }

        if (is_numeric($this->config->get('activitylog.defaultUserId'))) {
            return $this->config->get('activitylog.defaultUserId');
        };

        return '';
    }
public function normalizeUserId ( $ userId ) { if ( is_numeric ( $ userId ) ) { return $ userId ; } if ( is_object ( $ userId ) ) { return $ userId -> id ; } if ( $ this -> auth -> check ( ) ) { return $ this -> auth -> user ( ) -> id ; } if ( is_numeric ( $ this -> config -> get ( 'activitylog.defaultUserId' ) ) ) { return $ this -> config -> get ( 'activitylog.defaultUserId' ) ; } ; return '' ; }
Normalize the user id.

@param object|int $userId

@return int
Normalize the user id .