vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   PHP code to determine user status (https://vborg.vbsupport.ru/showthread.php?t=147855)

Fabsboards 05-22-2007 03:54 PM

PHP code to determine user status
 
I want to create a few web pages for our users with admin status.

Is it possible to use PHP to determine whether or not a user is logged in, and what type of user they are?

Links to sample code would be greatly appreciated.

We are currently running v. 3.0.7, but plan to upgrade in the near future.

Fabsboards 05-31-2007 12:06 AM

Anybody? I thought this would be simple.

Fabsboards 06-02-2007 08:17 PM

Does anyone actually read these messages???

Dismounted 06-03-2007 02:22 AM

We do read these messages....It's only because you're using 3.0.x that it's going to be hard to get a reply.

Fabsboards 06-03-2007 04:46 AM

Quote:

Originally Posted by Dismounted (Post 1260112)
We do read these messages....It's only because you're using 3.0.x that it's going to be hard to get a reply.

Thanks! I'll get updated this weekend. Then I'll be back!

Fabsboards 07-21-2007 03:39 PM

Okay, we upgraded our license and upgraded to 3.6.7.

I'm looking for PHP code to determine if someone is logged in, and what kind of user they are. Are there any example files I can use?

nexialys 07-21-2007 05:10 PM

the vBulletin code for logged in verification is simple:

PHP Code:

if($vbulletin->userinfo['userid']) {
this user is logged in


and for examples... all the vBulletin core files have authentication for permissions, sessions and actions... you are not very clear on what you need to know, so it is complicated to have examples...

Kirk Y 07-21-2007 10:05 PM

PHP Code:

if (is_member_of($vbulletin->userinfo6)){
   
This user is an Administrator.



ragtek 07-21-2007 10:09 PM

if will also work
PHP Code:

if($vbulletin->userinfo['permissions']['adminpermissions']){..} 

or
PHP Code:

if(!$show['admincplink'])print_no_permission(); 

i think there are many ways
but not all are correct, because, there are many different "admintypes" (i hope someone can explain more what i think*g*
i mean because of the adminpermissions..)


All times are GMT. The time now is 06:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01454 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete