|
@@ -83,8 +83,34 @@ class PublicController extends AdminBaseController
|
|
|
$result = Db::name('user')->where($where)->find();
|
|
$result = Db::name('user')->where($where)->find();
|
|
|
|
|
|
|
|
if (!empty($result)) {
|
|
if (!empty($result)) {
|
|
|
|
|
+
|
|
|
|
|
+ ///pppp
|
|
|
|
|
+ ///主
|
|
|
|
|
+// if($result['user_type']=='3')
|
|
|
|
|
+// {
|
|
|
|
|
+// $this->error('您登录的信息不存在');
|
|
|
|
|
+// }
|
|
|
|
|
+ /// pppp
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //pppp
|
|
|
|
|
+ //次
|
|
|
|
|
+// if($result['user_type']!='3')
|
|
|
|
|
+// {
|
|
|
|
|
+// $this->error('您登录的信息不存在');
|
|
|
|
|
+// }
|
|
|
|
|
+ if($result['user_type']=='3') {
|
|
|
|
|
+ $res_fp = Db::name('user_fp')->where('userid', $result['id'])->find();
|
|
|
|
|
+ if ($res_fp['end_time'] < time()) {
|
|
|
|
|
+ $this->error('您暂时无法登录');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ ///pppp
|
|
|
|
|
|
|
|
- if (cmf_compare_password($pass, $result['user_pass'])) {
|
|
|
|
|
|
|
+ if ($pp=cmf_compare_password($pass, $result['user_pass'])) {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
$groups = Db::name('RoleUser')
|
|
$groups = Db::name('RoleUser')
|
|
|
->alias("a")
|
|
->alias("a")
|
|
|
->join('__ROLE__ b', 'a.role_id =b.id')
|
|
->join('__ROLE__ b', 'a.role_id =b.id')
|
|
@@ -107,6 +133,7 @@ class PublicController extends AdminBaseController
|
|
|
session("__LOGIN_BY_CMF_ADMIN_PW__", null);
|
|
session("__LOGIN_BY_CMF_ADMIN_PW__", null);
|
|
|
$this->success(lang('LOGIN_SUCCESS'), url("admin/Index/index"));
|
|
$this->success(lang('LOGIN_SUCCESS'), url("admin/Index/index"));
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+
|
|
|
$this->error(lang('PASSWORD_NOT_RIGHT'));
|
|
$this->error(lang('PASSWORD_NOT_RIGHT'));
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|