Advertisement
Guest User

login login login

a guest
Jun 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. public $modelClass = 'app\models\LoginForm';
  2.  
  3. public function actionLogin() {
  4.  
  5. $username = Yii::$app->request->post('username');
  6. $password = Yii::$app->request->post('password');
  7. $loginForm = new \app\models\LoginForm();
  8. $loginForm->username = $username;
  9. $loginForm->password = $password;
  10. $success = $loginForm->login();
  11. echo $success == true ? 'OK' : 'NOK';
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement