diff --git a/src/Rateable/Rating.php b/src/Rateable/Rating.php index 1984cdb..c0bb54a 100644 --- a/src/Rateable/Rating.php +++ b/src/Rateable/Rating.php @@ -27,6 +27,11 @@ public function rateable() */ public function user() { - return $this->belongsTo(Config::get('auth.providers.users.model')); + $userClassName = Config::get('auth.model'); + if (is_null($userClassName)) { + $userClassName = Config::get('auth.providers.users.model'); + } + + return $this->belongsTo($userClassName); } }