修改跨域登录功能
This commit is contained in:
parent
f7fbbf4e64
commit
1a6b0375a9
|
@ -564,6 +564,8 @@ class AccountController extends Zend_Controller_Action
|
|||
|
||||
} //找回密码
|
||||
|
||||
/*
|
||||
//westdc cross doamin login
|
||||
public function wcdloginAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
@ -584,6 +586,7 @@ class AccountController extends Zend_Controller_Action
|
|||
}
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ class Member
|
|||
public $FieldLastloginIp = "last_login_ip";
|
||||
public $GravatarEmailField = "gravatar_email";
|
||||
|
||||
public $rootdomain = "";
|
||||
|
||||
public $RoleMember = "member";
|
||||
|
||||
function __construct()
|
||||
|
@ -41,6 +43,11 @@ class Member
|
|||
{
|
||||
$this->user= $_COOKIE['user'];
|
||||
}
|
||||
|
||||
if(!isset($this->config->auth->domain) && !empty($this->config->auth->domain))
|
||||
{
|
||||
$this->rootdomain = $this->config->auth->domain;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -98,8 +105,14 @@ class Member
|
|||
$time = 604800;
|
||||
}
|
||||
|
||||
setcookie('user',$uname,time()+$time,'/');
|
||||
setcookie('scr',$scrString,time()+$time,'/');
|
||||
if(empty($this->rootdomain))
|
||||
{
|
||||
setcookie('user',$uname,time()+$time,'/');
|
||||
setcookie('scr',$scrString,time()+$time,'/');
|
||||
}else{
|
||||
setcookie('user',$uname,time()+$time,'/',$this->rootdomain);
|
||||
setcookie('scr',$scrString,time()+$time,'/',$this->rootdomain);
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (Exception $e) {
|
||||
|
|
Loading…
Reference in New Issue