Add activity logging for authentication events
This commit is contained in:
parent
5bb66a00d8
commit
0999ad7ff0
11 changed files with 179 additions and 18 deletions
|
@ -3,6 +3,7 @@
|
|||
namespace Pterodactyl\Models;
|
||||
|
||||
use Pterodactyl\Rules\Username;
|
||||
use Pterodactyl\Facades\Activity;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Validation\Rules\In;
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
|
@ -214,6 +215,11 @@ class User extends Model implements
|
|||
*/
|
||||
public function sendPasswordResetNotification($token)
|
||||
{
|
||||
Activity::event('login.reset-password')
|
||||
->withRequestMetadata()
|
||||
->subject($this)
|
||||
->log('sending password reset email');
|
||||
|
||||
$this->notify(new ResetPasswordNotification($token));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue