예제 #1
0
 public function __construct($id, $module, $config = array())
 {
     parent::__construct($id, $module, $config);
     //Require existence of identityClass and private object instantiation
     $userClass = \Yii::$app->user->identityClass;
     //Throw error if unset
     //Scenario sign-up (temporary) - status active
     $this->_user = new $userClass(['scenario' => User::SCENARIO_SIGNUP, 'status' => 10]);
     //Optional existence of authManager class and private object instantiation
     if (isset(\Yii::$app->authManager)) {
         $this->_auth = \Yii::$app->authManager;
     }
 }
예제 #2
0
 public function __construct($id, $module, $config = array())
 {
     parent::__construct($id, $module, $config);
     //Setup the authManager as per config
     $this->_authManager = \Yii::$app->authManager;
 }
예제 #3
0
 public function __construct($id, $module, $config = array())
 {
     parent::__construct($id, $module, $config);
     $this->_userClass = $module->params['identityClass'];
     $this->_auth = \Yii::$app->authManager;
 }
예제 #4
0
 public function __construct($id, $module, $config = array())
 {
     parent::__construct($id, $module, $config);
     $this->_userClass = \Yii::$app->user->identityClass;
 }