/** * session call */ public static function session($session) { self::need(self::$path . 'Storage/Session.php'); if ($session) { Session::start('../app/storage/session'); } }
public static function getUserRole() { $get_session_role = null; if (Session::get('ArFramework_pnl_arf_profil') !== NULL) { $get_session_role = Session::get('ArFramework_pnl_arf_profil'); if (is_numeric($get_session_role['role'])) { $get_session_role = Session::get('ArFramework_pnl_arf_profil'); $data = get_object_vars(\Group::find($get_session_role['role'])); return $data['group_name']; } else { $get_session_role = Session::get('ArFramework_pnl_arf_profil'); $data = get_object_vars(\Group::get("group_name", "=", $get_session_role['role'])); foreach ($data['data'] as $row) { $rows = $row->group_name; } return $rows; } } else { $_SESSION['ArFramework_pnl_arf_profil']['role'] = Config::get('app.anonymouse'); $get_session_role = Session::get('ArFramework_pnl_arf_profil'); return $get_session_role['role']; } }