public function register($email, $password) { $this->db->set('email', $email); $this->db->set('password', Password::create_hash($password)); $this->db->insert('users'); return $this->db->insert_id(); }
public function register() { $res = new stdClass(); $res->success = FALSE; $data = $this->post(); $this->load->model('sp_model'); unset($data->confirmPassword); $data->joinDate = date("Y-m-d"); $data->password = Password::create_hash($data->password); $res->id = $this->sp_model->create('jwt_user', $data); JwtUtil::log(json_encode($res)); $this->load->view('json', array('output' => $res)); }