Skip to content

Commit

Permalink
Update HistoryObserver.php
Browse files Browse the repository at this point in the history
fix HistoryObserver::getUserID() and HistoryObserver::getUserType()
  • Loading branch information
timopaul authored Jan 6, 2018
1 parent e4c67bd commit 377b2c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/HistoryObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ public static function getModelName($model)

public static function getUserID()
{
return auth()->check() ? get_class(auth()->user()) : null;
return auth()->check() ? auth()->user()->id : null;
}

public static function getUserType()
{
return auth()->check() ? auth()->user()->id : null;
return auth()->check() ? get_class(auth()->user()) : null;
}

public static function filter($action)
Expand All @@ -119,4 +119,4 @@ public static function filter($action)
return is_null($action) || in_array($action, config('history.events_whitelist'));
}

}
}

0 comments on commit 377b2c9

Please sign in to comment.