init
Showing
1 changed file
with
15 additions
and
12 deletions
| ... | @@ -13,6 +13,20 @@ class CheckLogin | ... | @@ -13,6 +13,20 @@ class CheckLogin |
| 13 | public function check() | 13 | public function check() |
| 14 | { | 14 | { |
| 15 | $session = $this->CI->session; | 15 | $session = $this->CI->session; |
| 16 | |||
| 17 | /*if (preg_match("/admin|base/i", uri_string())) { | ||
| 18 | if(!$this->CI->session->isadmin){ | ||
| 19 | redirect('login'); | ||
| 20 | return; | ||
| 21 | } | ||
| 22 | }*/ | ||
| 23 | if (preg_match('/work/config/data/finance/loan/perm/tool/user/i', uri_string())) { | ||
| 24 | if (!$this->CI->session->islogin) { | ||
| 25 | redirect('login'); | ||
| 26 | return; | ||
| 27 | } | ||
| 28 | } | ||
| 29 | |||
| 16 | // if (!$session->products) { | 30 | // if (!$session->products) { |
| 17 | $session->products = $this->getProduct(); | 31 | $session->products = $this->getProduct(); |
| 18 | // } | 32 | // } |
| ... | @@ -89,18 +103,7 @@ class CheckLogin | ... | @@ -89,18 +103,7 @@ class CheckLogin |
| 89 | if (!$session->sourceBaseType) { | 103 | if (!$session->sourceBaseType) { |
| 90 | $session->sourceBaseType = $this->getSourceBaseType(); | 104 | $session->sourceBaseType = $this->getSourceBaseType(); |
| 91 | } | 105 | } |
| 92 | /*if (preg_match("/admin|base/i", uri_string())) { | 106 | |
| 93 | if(!$this->CI->session->isadmin){ | ||
| 94 | redirect('login'); | ||
| 95 | return; | ||
| 96 | } | ||
| 97 | } | ||
| 98 | if (preg_match('/ucenter/i', uri_string())) { | ||
| 99 | if (!$this->CI->session->islogin) { | ||
| 100 | redirect('login/app'); | ||
| 101 | return; | ||
| 102 | } | ||
| 103 | }*/ | ||
| 104 | } | 107 | } |
| 105 | 108 | ||
| 106 | private function getProduct() | 109 | private function getProduct() | ... | ... |
-
Please register or sign in to post a comment