本文整理汇总了PHP中Encryption::sha1Encrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP Encryption::sha1Encrypt方法的具体用法?PHP Encryption::sha1Encrypt怎么用?PHP Encryption::sha1Encrypt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Encryption
的用法示例。
在下文中一共展示了Encryption::sha1Encrypt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ManagerUser
$manager = new ManagerUser($db);
$today = getdate();
$params['email'] = Request::req('email');
$params['password'] = sha1(Request::req('password'));
$rpass = sha1(Request::req('password'));
if ($params['password'] != $rpass) {
header('Location:../../login.php?r=2');
exit;
}
$params['alias'] = Request::req('alias');
$params['dischargeDate'] = $today['year'] . '-' . $today['mon'] . '-' . $today['mday'];
$params['active'] = 0;
$params['administrator'] = 0;
$params['personal'] = 0;
if ($params['alias'] === '' || $params['alias'] === NULL) {
$params['alias'] = $params['email'];
}
if (Request::req('rol') == 'administrator') {
$params['administrator'] = 1;
} else {
if (Request::req('rol') == 'personal') {
$params['personal'] = 1;
}
}
$user = new User();
$user->set($params);
$r = $manager->insert($user);
$db->close();
if ($r == 1) {
header('Location:../../extra/sendmail.php?user=' . Encryption::sha1Encrypt($params['alias']) . '&email=' . urlencode($params['email']) . '&time=' . Server::getRequestDate());
}