20 lines
381 B
PHP
20 lines
381 B
PHP
<?php
|
|
|
|
class User_model extends CI_Model {
|
|
|
|
public function __construct() {
|
|
$this->load->database();
|
|
}
|
|
|
|
public function get_user_by_email($email) {
|
|
$query = $this->db->get_where('user', ['email' => $email]);
|
|
return $query->row_array();
|
|
}
|
|
|
|
public function create_user($data) {
|
|
return $this->db->insert('user', $data);
|
|
}
|
|
}
|
|
|
|
?>
|