예제 #1
0
 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();
 }
예제 #2
0
파일: Account.php 프로젝트: JUkhan/jwt_php
 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));
 }