Exemple #1
0
 public function action_validate()
 {
     $post = array('email' => '*****@*****.**', 'password' => 'qwn', 'username' => 'rhr');
     $users = Model::factory('v1_users');
     $valid = $users->validate($post);
     if ($valid->check()) {
         $user = $users->add($post);
     } else {
         d::v($valid->errors('register'));
     }
 }
Exemple #2
0
 public function action_api()
 {
     $data = array('email' => '*****@*****.**', 'password' => 'qweqwe');
     $data = $this->api->action('v1/auth/join')->params($data)->post();
     d::v($data);
 }