spatie / activitylog

A very simple activity logger to monitor the users of your website or application
https://spatie.be/opensource/laravel
MIT License
582 stars 75 forks source link

Compatibility with oAuth2 #46

Closed 06chaynes closed 8 years ago

06chaynes commented 8 years ago

I am using the package oauth2-server-laravel for authenticating users. I was wondering if you could help point me in the right direction to modify this package to get the user ID when using this solution.

It appears that I need to replace the bit of code in ActivitylogSupervisor.php __contruct method that deals with the Illuminate Auth\Guard contract but I am unsure of what those changes might be at this time. Any help at all would be greatly appreciated as this package provides all I need withholding this one critical piece.

06chaynes commented 8 years ago

After some digging I found that I could override the $userId variable in the log method to get this working:

    $userId = (int) Authorizer::getResourceOwnerId();

This may not be the best fix but it seems to be working properly in my tests so far.

freekmurze commented 8 years ago

Hi, this package has been abandoned. Please use laravel-activitylog instead.