minor cleanups.
This commit is contained in:
parent
4c872d76dd
commit
9af7b3cc01
3 changed files with 12 additions and 14 deletions
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace App\Listener;
|
||||
|
||||
use Phalcon\Events\Event;
|
||||
use Phalcon\Mvc\Dispatcher;
|
||||
use Phalcon\Mvc\User\Plugin;
|
||||
use Phalcon\Events\Event,
|
||||
Phalcon\Mvc\Dispatcher,
|
||||
Phalcon\Mvc\User\Plugin;
|
||||
|
||||
use Httpcb\Acl;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class ActivityLog extends Plugin
|
|||
*/
|
||||
public function onLogin(Event $event, Auth $auth, $type)
|
||||
{
|
||||
$this->_log($auth->getUser(), "Logged in ({$type})");
|
||||
$this->_log($auth->getUser(), sprintf("Logged in (%s)", $type));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -55,13 +55,11 @@ class ActivityLog extends Plugin
|
|||
*/
|
||||
public function onOAuthConnected(Event $event, User $user, OAuthUserDataInterface $provider)
|
||||
{
|
||||
$name = $provider->getProvider();
|
||||
|
||||
$this->_log($user, "OAuth connected ({$name})");
|
||||
$this->_log($user, sprintf("OAuth connected (%s)", $provider->getProvider()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired when a user is connected to a OAuth provider.
|
||||
* Fired when a user is disconnected from a OAuth provider.
|
||||
*
|
||||
* @param Event $event
|
||||
* @param User $user
|
||||
|
|
@ -69,7 +67,7 @@ class ActivityLog extends Plugin
|
|||
*/
|
||||
public function onOAuthDisconnect(Event $event, User $user, $providerName)
|
||||
{
|
||||
$this->_log($user, "OAuth disconnected ({$providerName})");
|
||||
$this->_log($user, sprintf("OAuth disconnected (%s)", $providerName));
|
||||
}
|
||||
|
||||
protected function _log(User $user, $message)
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
namespace App\Listener;
|
||||
|
||||
use Exception;
|
||||
use Phalcon\Events\Event;
|
||||
use Phalcon\Mvc\User\Plugin;
|
||||
use Phalcon\Mvc\Dispatcher;
|
||||
use Phalcon\Mvc\Dispatcher\Exception as DispatcherException;
|
||||
use Exception,
|
||||
Phalcon\Events\Event,
|
||||
Phalcon\Mvc\User\Plugin,
|
||||
Phalcon\Mvc\Dispatcher,
|
||||
Phalcon\Mvc\Dispatcher\Exception as DispatcherException;
|
||||
|
||||
/**
|
||||
* Class DispatchListener
|
||||
|
|
|
|||
Reference in a new issue