connexion presque finie
This commit is contained in:
21
application/models/User_model.php
Normal file
21
application/models/User_model.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
class User_model extends CI_Model {
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->load->database();
|
||||
}
|
||||
|
||||
public function create_user($data)
|
||||
{
|
||||
return $this->db->insert('user', $data);
|
||||
}
|
||||
|
||||
public function get_user_by_email($email)
|
||||
{
|
||||
$this->db->where('email', $email);
|
||||
$query = $this->db->get('user');
|
||||
return $query->row_array();
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user