|
|
|
@ -16,12 +16,12 @@ use Yii;
|
|
|
|
|
|
|
|
|
|
class UserController extends Controller |
|
|
|
|
{ |
|
|
|
|
private $_service; |
|
|
|
|
private $service; |
|
|
|
|
|
|
|
|
|
public function __construct($id, $module, UserManageService $service, $config = []) |
|
|
|
|
{ |
|
|
|
|
parent::__construct($id, $module, $config); |
|
|
|
|
$this->_service = $service; |
|
|
|
|
$this->service = $service; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function actionAdd() |
|
|
|
@ -38,7 +38,7 @@ class UserController extends Controller
|
|
|
|
|
$form->role = $role; |
|
|
|
|
|
|
|
|
|
if ($form->validate()) { |
|
|
|
|
$this->_service->create($form); |
|
|
|
|
$this->service->create($form); |
|
|
|
|
$this->stdout('Done!' . PHP_EOL); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
@ -59,7 +59,7 @@ class UserController extends Controller
|
|
|
|
|
$form->role = 'admin'; |
|
|
|
|
|
|
|
|
|
if ($form->validate()) { |
|
|
|
|
$this->_service->create($form); |
|
|
|
|
$this->service->create($form); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|