backoffice/application/models/Authentification_url_model.php

34 lines
749 B
PHP
Raw Normal View History

2020-02-06 10:34:29 +00:00
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Created by PhpStorm.
* User: Hanry Nzale
* Date: 05/08/2018
* Time: 00:22
*/
class Authentification_url_model extends CI_Model
{
public function getExpireDate($token){
$this->db->select('expire_at');
$this->db->from('authentification_url');
$this->db->where('token',$token);
$query=$this->db->get();
if($query->num_rows()>0){
return $this->db->get()->row()->expire_at;
}else{
return null;
}
}
public function save_auth($auth){
$this->db->insert('authentification_url', $auth);
return $this->db->insert_id();
}
}