Topic: How to know if the administrator is logged in?
I all.
I try to integrate PunBB into my site.
I use external.php to show general information about user and posts.
Now I must know when Administrator is logged or, generally, the user's level (Administrator, simple user and so on).
I try to read $pun_user variable whith this code:
global $db;
global $pun_user;
$lang_common = 'English';
define('PUN_ROOT', 'pubb/');
require PUN_ROOT.'include/common.php';
print_r($pun_user);
and show ALWAYS:
Array ( [id] => 1 [group_id] => 3 [username] => Guest [password] => Guest [email]=> Guest [title] => [realname] => [url]=> [jabber] => [icq] => [msn] => [aim] => [yahoo] => [location] => [use_avatar] => 0 [signature] => [disp_topics] => [disp_posts] => [email_setting] => 1 [save_pass] => 1 [notify_with_post] => 0 [show_smilies] => 1 [show_img] => 1 [show_img_sig] => 1 [show_avatars] => 1 [show_sig] => 1 [timezone] => [language] => [style] => [num_posts] => 0 [last_post] => [registered] => 0 [registration_ip] => 0.0.0.0 [last_visit] => 0 [admin_note] => [activate_string] => [activate_key] => [g_id] => 3 [g_title] => Guest [g_user_title] => [g_read_board] => 1 [g_post_replies] => 0 [g_post_topics] => 0 [g_post_polls] => 0 [g_edit_posts] => 0 [g_delete_posts] => 0 [g_delete_topics] => 0 [g_set_title] => 0 [g_search] => 1 [g_search_users] => 1 [g_edit_subjects_interval] => 0 [g_post_flood] => 0 [g_search_flood] => 0 [logged] => 1116516066 [is_guest] => 1 )
After login or logout say that I'm always "Guest". How it's possible? Where is my mistake?
Any suggestion?
sorry for my english...