Advertisement
joachip

Super simple theme-less phpBB 3.x plug-in

Mar 3rd, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?
  2. // phpBB initialization
  3. define('IN_PHPBB', true);
  4. $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
  5. $phpEx = substr(strrchr(__FILE__, '.'), 1);
  6. include($phpbb_root_path . 'common.' . $phpEx);
  7. $user->session_begin();
  8. $auth->acl($user->data);
  9.  
  10. // require user to be logged in
  11. if (!$auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
  12. {
  13.     if ($user->data['user_id'] != ANONYMOUS)
  14.     {
  15.         trigger_error('NO_VIEW_USERS');
  16.     }
  17.  
  18.     login_box('', ((isset($user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)])) ? $user->lang['LOGIN_EXPLAIN_' . strtoupper($mode)] : $user->lang['LOGIN_EXPLAIN_MEMBERLIST']));
  19. }
  20.  
  21. // My code
  22. echo 'Hello '.$user->data['username'];
  23. echo ' (User ID '.$user->data['user_id'].")<br>\n";
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement