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')); } }
public function action_api() { $data = array('email' => '*****@*****.**', 'password' => 'qweqwe'); $data = $this->api->action('v1/auth/join')->params($data)->post(); d::v($data); }