Ejemplo n.º 1
0
 public function action_login()
 {
     if (Users::oath($this->post('email'), $this->post('password'))) {
         $json = array('error' => false, 'message' => array());
     } else {
         $json = array('error' => true, 'message' => array('Пользователь с указанными данными не зарегистирован'));
     }
     $this->header('Content-type', 'application/json')->body(json_encode($json));
 }