/**
  * Creates a new User model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new SignupForm();
     $modelAuthItem = new AuthItem();
     if ($model->load(Yii::$app->request->post())) {
         if ($user = $model->signup()) {
             echo 1;
             GlobalFunctionController::activity_user("[CREATE USER] Username : {$model->username} ,Email : {$model->email}, Allowed IP {model->ip}, Multiple Login {$model->flag_login}");
         }
     }
     return $this->renderAjax('signup', ['model' => $model, 'roles' => $modelAuthItem->getRoles()]);
 }
Beispiel #2
0
echo $form->field($model, 'active_date', ['addon' => ['prepend' => ['content' => '<i class="glyphicon glyphicon-calendar"></i>']], 'options' => ['class' => 'drp-container form-group', 'readonly' => 'readonly']])->widget(DateRangePicker::classname(), ['useWithAddon' => true, 'convertFormat' => true, 'pluginOptions' => ['singleDatePicker' => true, 'locale' => ['format' => 'Y-m-d']]]);
?>

    <?php 
echo $form->field($model, 'rtries_count')->textInput();
?>

    <?php 
echo $form->field($model, 'passage1')->textInput();
?>

    <?php 
echo $form->field($model, 'passage2')->textInput();
?>
    <?php 
$data = AuthItem::find('distinct description')->where(['not', ['description' => 'is null']])->asArray()->all();
$ary = [];
foreach ($data as $key => $value) {
    $ary[$value['description']] = $value['description'];
}
?>
    <?php 
echo $form->field($model, 'usermode')->widget(Select2::classname(), ['options' => ['placeholder' => 'Select Multiple Login'], 'hideSearch' => false, 'data' => $ary, 'pluginOptions' => ['allowClear' => true]]);
?>
    
    <?php 
echo $form->field($model, 'ip')->textInput(['maxlength' => true]);
?>

    <div class="form-group">
        <?php