function s_action_user($verify = true) { //先从memcache中获取 if (false === ($sso = new SSOCookie('cookie.conf')) || false === ($cookie = $sso->getCookie()) || s_bad_id($cookie['uniqueid'], $uniqueid)) { return false; } if ($verify === false) { return $cookie; } //需要从weibo平台中获取用户信息 return s_user_by_uid($uniqueid); }
function s_action_user($update = true) { //先从memcache中获取 if (false === ($sso = new SSOCookie('cookie.conf')) || false === ($cookie = $sso->getCookie()) || s_bad_id($cookie['uniqueid'], $uniqueid)) { return false; } //将cookie中的变量换成标准的uid, uname $cookie['uid'] = $cookie['uniqueid']; $cookie['uname'] = $cookie['screen_name']; if ($update === false) { return $cookie; } //需要从weibo平台中获取用户信息 return s_user_by_uid($uniqueid); }
function s_action_user($update = true, $checkref = true) { //检查referer if ($checkref === true) { if (false === ($ref = s_action_referer())) { //没有来源,有可能是非法请求或者是flash请求 return false; } if (false === ($allows = function_exists('source_list'))) { } } //先从memcache中获取 if (false === ($sso = new SSOCookie('cookie.conf')) || false === ($cookie = $sso->getCookie()) || s_bad_id($cookie['uniqueid'], $uniqueid)) { return false; } //将cookie中的变量换成标准的uid, uname $cookie['uid'] = $cookie['uniqueid']; $cookie['uname'] = $cookie['screen_name']; if ($update === false) { return $cookie; } //需要从weibo平台中获取用户信息 return s_user_by_uid($uniqueid); }