1
0
mirror of https://e.coding.net/circlecloud/MinecraftAccount.git synced 2025-11-24 21:26:09 +00:00
Files
MinecraftAccount/Application/Common/Common/function.php
j502647092 1e5236aa3e 更新项目文件...
Signed-off-by: j502647092 <jtb1@163.com>
2015-11-08 23:56:53 +08:00

21 lines
448 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* 检测用户是否登录
* @return integer 0-未登录大于0-当前登录用户ID
*/
function is_login() {
$user = session ( 'user' );
if (empty ( $user )) {
return 0;
} else {
return $user ['uid'];
}
}
/**
* 检测输入的验证码是否正确
* @return boolean 正确返回TRUE
*/
function check_verify($code, $id = '') {
$verify = new \Think\Verify ();
return $verify->check ( $code, $id );
}