|
|
|
@ -81,7 +81,7 @@ class PublicController extends \Think\Controller
|
|
|
|
|
$this->error('验证码错误');
|
|
|
|
|
}
|
|
|
|
|
$member = M('ucenter_member ucenter')
|
|
|
|
|
->field("uid,nickname,last_login_time,status")
|
|
|
|
|
->field("uid,nickname,ucenter.last_login_time,member.status")
|
|
|
|
|
->join("left join sys_member member on ucenter.id=member.uid")
|
|
|
|
|
->where(['mobile' => $mobile])->find();
|
|
|
|
|
|
|
|
|
@ -94,8 +94,39 @@ class PublicController extends \Think\Controller
|
|
|
|
|
if ($member) {
|
|
|
|
|
/* 记录登录SESSION和COOKIES */
|
|
|
|
|
$Member = D('Member');
|
|
|
|
|
$Member->autoLogin($member);
|
|
|
|
|
/* 更新登录信息 */
|
|
|
|
|
$data = array(
|
|
|
|
|
'uid' => $member['uid'],
|
|
|
|
|
'login' => array('exp', '`login`+1'),
|
|
|
|
|
'last_login_time' => NOW_TIME,
|
|
|
|
|
'last_login_ip' => get_client_ip(1),
|
|
|
|
|
);
|
|
|
|
|
$Member->save($data);
|
|
|
|
|
|
|
|
|
|
$adminData = getAdminData($member['uid']);
|
|
|
|
|
$groupId = getGameGroup($member['uid']);
|
|
|
|
|
|
|
|
|
|
/* 记录登录SESSION和COOKIES */
|
|
|
|
|
$auth = array(
|
|
|
|
|
'uid' => $member['uid'],
|
|
|
|
|
'username' => $member['nickname'],
|
|
|
|
|
'last_login_time' => $member['last_login_time'],
|
|
|
|
|
'data_empower_type'=>$adminData['data_empower_type'],
|
|
|
|
|
'data_president'=>$adminData['data_president'],
|
|
|
|
|
'show_data'=>$adminData['show_data'],
|
|
|
|
|
);
|
|
|
|
|
//登录有效时间改为6小时
|
|
|
|
|
$expireTime = 3600;
|
|
|
|
|
ini_set('session.gc_maxlifetime', $expireTime);
|
|
|
|
|
ini_set('session.cookie_lifetime', $expireTime);
|
|
|
|
|
session('user_group_id',$groupId);
|
|
|
|
|
session('user_auth', $auth);
|
|
|
|
|
session('user_auth_sign', data_auth_sign($auth));
|
|
|
|
|
session('user_auth_expire', time());
|
|
|
|
|
session_regenerate_id();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
$this->error('登录失败');
|
|
|
|
|
}
|
|
|
|
|
// else {
|
|
|
|
|
// $partner = M('partner', 'tab_')->where(['link_phone' => $mobile,])->find();
|
|
|
|
|