add block/unblock service

This commit is contained in:
Antonio Ramirez
2016-12-04 23:20:33 +01:00
parent bda69d38af
commit be80b12a03
4 changed files with 35 additions and 4 deletions

View File

@ -255,7 +255,7 @@ class AdminController extends Controller
/** @var UserEvent $event */
$event = $this->make(UserEvent::class, [$user]);
if ($this->make(UserBlockService::class, [$user, $event])->run()) {
if ($this->make(UserBlockService::class, [$user, $event, $this])->run()) {
Yii::$app->getSession()->setFlash('success', Yii::t('user', 'User block status has been updated.'));
} else {
Yii::$app->getSession()->setFlash('danger', Yii::t('user', 'Unable to update block status.'));