...
|
...
|
@@ -263,7 +263,8 @@ class Facade_Auth |
|
|
}
|
|
|
|
|
|
//TODO 判断是否存在当前账号是否已经存在
|
|
|
$exist_auth = self::getAuthByTypeAndAid($auth_type, $auth_id);
|
|
|
//$exist_auth = self::getAuthByTypeAndAid($auth_type, $auth_id);
|
|
|
$exist_auth = self::getAuthByTypeAndAidNocache($auth_type, $auth_id);
|
|
|
if(!empty($exist_auth))
|
|
|
{
|
|
|
$ret = array('code' => Config_Code::$error['account_exist']['code'], 'message' => Config_Code::$error['account_exist']['message']);
|
...
|
...
|
@@ -365,7 +366,35 @@ class Facade_Auth |
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取登录账号的信息 没缓存
|
|
|
*
|
|
|
* @param type $type 登录类型
|
|
|
* @param type $auth_id 登录账号
|
|
|
* @return array
|
|
|
*/
|
|
|
public static function getAuthByTypeAndAidNocache($type, $auth_id)
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
if (isset($auth_id) && is_numeric($type))
|
|
|
{
|
|
|
$result = self::service()->getAuthByTypeAndAidNocache($type, $auth_id);
|
|
|
if(!$result)
|
|
|
{
|
|
|
if($type==self::AUTH_TYPE_FACEBOOK)
|
|
|
{
|
|
|
$auth_id = self::service()->getFacebookRela($auth_id);
|
|
|
$result = self::service()->getAuthByTypeAndAidNocache($type, $auth_id);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取所有口令列表
|
|
|
*/
|
...
|
...
|
|