1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
-
-
- namespace app\plugins\controller;
- use app\common\controller\Common;
- use think\Db;
-
- class Base extends Common {
-
-
-
- function __construct()
- {
- parent::__construct();
- }
-
-
-
- public function _initialize()
- {
- parent::_initialize();
- $users_id = session('users_id');
- $users_id = intval($users_id);
- if (!empty($users_id)) {
- $users = GetUsersLatestData($users_id);
- if (empty($users)) {
- session('users_id', null);
- session('users', null);
- cookie('users_id', null);
- } else {
- if (0 > $users['is_lock'] && IS_POST) {
- $users_lock_model = config('global.users_lock_model');
- $users_lock_model_msg = !empty($users_lock_model[$users['is_lock']]) ? $users_lock_model[$users['is_lock']]['msg'] : '';
- $this->error($users_lock_model_msg);
- }
- }
- $this->users = $users;
- $this->users_id = $users['users_id'];
- }
- }
- }
|