Menu With Auth
This commit is contained in:
@ -42,6 +42,10 @@ Class Admin{
|
||||
if(empty($id) && $id==0){
|
||||
$id = Admin::getID();
|
||||
}
|
||||
return ORM::for_table('tbl_users')->find_one($id);
|
||||
if($id){
|
||||
return ORM::for_table('tbl_users')->find_one($id);
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
}
|
@ -18,7 +18,7 @@ $menu_registered = array();
|
||||
* @param string icon from ion icon, ion-person, only for AFTER_
|
||||
* @param string label for showing label or number of notification or update
|
||||
* @param string color Label color
|
||||
* @param string auth ['SuperAdmin', 'Admin', 'Report', 'Agent', 'Sales'] will only show in this user, empty array for all users
|
||||
* @param string auth authorization ['SuperAdmin', 'Admin', 'Report', 'Agent', 'Sales'] will only show in this user, empty array for all users
|
||||
*/
|
||||
function register_menu($name, $admin, $function, $position, $icon = '', $label = '', $color = 'success', $auth = [])
|
||||
{
|
||||
|
Reference in New Issue
Block a user