d8b678f2 by Zelig

cookie

1 parent 4db1e873
...@@ -25,6 +25,7 @@ if(!function_exists('hasRole')) { ...@@ -25,6 +25,7 @@ if(!function_exists('hasRole')) {
25 $CI = &get_instance(); 25 $CI = &get_instance();
26 $CI->load->helper('cookie'); 26 $CI->load->helper('cookie');
27 $login_user = get_cookie('login_user'); 27 $login_user = get_cookie('login_user');
28 if($login_user) {
28 $login_user = json_decode($login_user, true); 29 $login_user = json_decode($login_user, true);
29 foreach($login_user['roleKeys'] as $v){ 30 foreach($login_user['roleKeys'] as $v){
30 if(in_array($v, $roles)){ 31 if(in_array($v, $roles)){
...@@ -33,4 +34,5 @@ if(!function_exists('hasRole')) { ...@@ -33,4 +34,5 @@ if(!function_exists('hasRole')) {
33 } 34 }
34 return false; 35 return false;
35 } 36 }
37 }
36 } 38 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!