本文整理匯總了PHP中Crypt::rijndaelDecrypt方法的典型用法代碼示例。如果您正苦於以下問題:PHP Crypt::rijndaelDecrypt方法的具體用法?PHP Crypt::rijndaelDecrypt怎麽用?PHP Crypt::rijndaelDecrypt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Crypt
的用法示例。
在下文中一共展示了Crypt::rijndaelDecrypt方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: activate
/**
* @return int
*/
public function activate()
{
$this->db->select('id, voornaam, tussenvoegsel, achternaam, email, active, admin');
$this->db->from('users');
$this->db->where('pepper', base64_decode($this->uri->rsegment(3)));
$query = $this->db->get();
if (!empty($query) && $query->num_rows() > 0) {
$row = $query->row_array();
if (md5($row['email']) == $this->uri->rsegment(4)) {
if ($row['active'] == 0) {
$data = array('active' => 1);
$this->db->where('pepper', base64_decode($this->uri->rsegment(3)));
$this->db->update('users', $data);
$this->load->library('session');
$data = array('userid' => $row['id'], 'firstname' => Crypt::rijndaelDecrypt($row['voornaam'], base64_decode($this->uri->rsegment(3))), 'affix' => Crypt::rijndaelDecrypt($row['tussenvoegsel'], base64_decode($this->uri->rsegment(3))), 'lastname' => Crypt::rijndaelDecrypt($row['achternaam'], base64_decode($this->uri->rsegment(3))), 'email' => $row['email'], 'admin' => $row['admin']);
$this->session->set_userdata($data);
return 0;
} else {
if ($row['active'] == 1) {
return 1;
}
}
}
}
return 2;
}