/** * Creates a new SeguridadUsuarios model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { try { $model = new SeguridadUsuarios(); if ($model->load(Yii::$app->request->post())) { $model->password = md5($model->password); if ($model->save()) { Yii::$app->session->setFlash('usuario Registrado'); return $this->redirect(['view', 'id' => $model->id_usuario]); } } else { return $this->render('create', ['model' => $model]); } } catch (Exception $ex) { } return false; }