mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
FTFY Refs #1796
The event should come after the logic as per the developer guidelines. If the event comes before the logic, it should be called beforeLogin. In this case, beforeLogin doesn't make sense, so just move the event after the parent::afterLogin call.
This commit is contained in:
parent
48148cfcd0
commit
d58a8478f6
@ -1,9 +1,9 @@
|
||||
<?php namespace Backend\Models;
|
||||
|
||||
use Mail;
|
||||
use Event;
|
||||
use Backend;
|
||||
use October\Rain\Auth\Models\User as UserBase;
|
||||
use Event;
|
||||
|
||||
/**
|
||||
* Administrator user model
|
||||
@ -108,11 +108,11 @@ class User extends UserBase
|
||||
$this->sendInvitation();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function afterLogin()
|
||||
{
|
||||
Event::fire('backend.user.login', [$this]);
|
||||
parent::afterLogin();
|
||||
Event::fire('backend.user.login', [$this]);
|
||||
}
|
||||
|
||||
public function sendInvitation()
|
||||
|
Loading…
x
Reference in New Issue
Block a user