本文整理汇总了PHP中Encrypt::decryptEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Encrypt::decryptEmail方法的具体用法?PHP Encrypt::decryptEmail怎么用?PHP Encrypt::decryptEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Encrypt
的用法示例。
在下文中一共展示了Encrypt::decryptEmail方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: POST_emailAction
/**
* 通过邮箱找回密码
* @method POST_emailAction
* @author NewFuture
*/
public function POST_emailAction()
{
$response['status'] = 0;
if (!Input::post('email', $email, 'email')) {
$response['info'] = '邮箱格式有误或者不支持!';
} elseif (!Input::post('number', $number, 'card')) {
$response['info'] = '学号格式有误!';
} elseif (!Safe::checkTry('pwd_email_' . $number)) {
$response['info'] = '尝试次数过多,临时封禁!';
} elseif (!($user = UserModel::where('number', $number)->field('id,name,email')->find())) {
$response['info'] = '尚未注册,或者学号错误';
} elseif (empty($user['email'])) {
$response['info'] = '未绑定邮箱,或者学号错误';
} elseif (Encrypt::decryptEmail($user['email']) != $email) {
$response['info'] = '绑定邮箱不一致,或者邮箱错误';
} elseif (!Mail::findPwd($email, $code = Random::code(6), $user['name'])) {
$response['info'] = '邮件发送出错,请联系我们!';
} else {
/*发送成功*/
$findPwd = ['id' => $user['id'], 'number' => $number, 'code' => strtoupper($code)];
Session::set('find_info', $findPwd);
Safe::del('pwd_email_' . $number);
$response['status'] = 1;
$response['info'] = '找回验证码已发送到' . $email;
}
$this->response = $response;
}
示例2: GET_emailAction
/**
* 获取用户真实手机
* GET /user/1/email
* @method GET_infoAction
* @param integer $id [description]
* @author NewFuture
*/
public function GET_emailAction($id = 0)
{
$pid = $this->authPrinter();
if (TaskModel::where('use_id', $id)->where('pri_id', $pid)->get('id')) {
$email = UserModel::where('id', '=', $id)->get('email');
$email = $email ? Encrypt::decryptEmail($email) : null;
$this->response(1, $email);
} else {
$this->response(0, '此同学未在此打印过');
}
}
示例3: GET_emailAction
/**
* 获取用户真实手机
* GET /user/1/email
* @method GET_infoAction
* @param integer $id [description]
* @author NewFuture
*/
public function GET_emailAction($id = 0)
{
$id = $this->auth($id);
$email = UserModel::where('id', '=', $id)->get('email');
$email = $email ? Encrypt::decryptEmail($email) : null;
$this->response(1, $email);
}
示例4: decrypt
/**
* 用户数据解码
* @method mask
* @param [type] &$user [description]
* @return [type] [description]
* @author NewFuture
*/
public static function decrypt(&$user)
{
if (isset($user['phone']) && $user['phone'] && $user['number'] && $user['id']) {
$user['phone'] = Encrypt::decryptPhone($user['phone'], $user['number'], $user['id']);
}
if (isset($user['email']) && ($email = $user['email'])) {
$user['email'] = Encrypt::decryptEmail($email);
}
return $user;
}