Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-15-2002, 07:34 PM
tHE DSS's Avatar
tHE DSS tHE DSS is offline
 
Join Date: Jun 2002
Location: UK
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Admin CP Login

Hiya.

I really would like to get some help/advise with the way vBulletin's AdminCP processes logins.

I get the reason why there is an absolute login policy - that is, even if you are logged into the board, you have to still type your username and password - that's great, because it can stop people from getting to your CP using your computer, say, whilst you nip to the toilet, or somthing - they will still need your username and password.

I've taken a look at the section which deals with all this, and see that the 'global.php' in the admin directory, checks to see if you are already logged into the CP as an admin, and if not, then you get the login box.

That 'form' consists of the usual 'text/password' input boxes, and also, 3 hidden key/values, going by the names of 's', 'login' and 'redirect'.

I see that the 's' key holds your current session hash, and the 'redirect' holds the page you requested.

But, the 'login' key, I don't see how that is processed with the AdminCP. I can't find anywhere where it is used.

What i'm after doing, is mimicing the way the AdminCP's login works, but for another login section.

I don't want to use any cookies (adminon, for example), I just want to use the session hash for tracking.

I've got a global script going with just the bits I need, and stuff... it checks the permissions array for my custom value to see if the current user is allowed to view that section, and if not, then the login boxes appear.

The form that gets called, is a new 'index.php', which calls the same 'global.php' script... the global.php calls the 'functions.php' script also.

So basically, when you type in your details and submit, you get logged in, and a session hash is assigned - then using the $bbuserinfo array, works from there, to check permissions etc.

What i'm finding doesn't work though, is the session hash passing.

Everytime I log in, I can't seem to get the proppa session hash.

I seem to get logged in, and then when redirected back, I have my previous session hash, which is the one as Guest.. but I check the session table, and i'm logged in as me.

It's a problem with obtaining the correct session hash.

Erm... ah man... i'm rambling rubbish I reckon. :nervous: :nervous:

In short : can anyone please explain the basics of the login routine with the AdminCP... so that I can mimic it, but without using cookies, just a session hash to track the user?

Cheers.
Reply With Quote
  #2  
Old 10-16-2002, 04:27 PM
tHE DSS's Avatar
tHE DSS tHE DSS is offline
 
Join Date: Jun 2002
Location: UK
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anybody know enough about the Admin CP login system to explain it to me?
Reply With Quote
  #3  
Old 10-17-2002, 09:54 PM
tHE DSS's Avatar
tHE DSS tHE DSS is offline
 
Join Date: Jun 2002
Location: UK
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, thanks for all the help. :laugh: :laugh:

I've sorted it and have a nice system in place.
Reply With Quote
  #4  
Old 12-19-2002, 09:38 PM
Phillies Phillies is offline
 
Join Date: Dec 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hm, I thnik that might be quit complicated, because the global.php in the admin directory include many functions that can be found all othe the script.
But if you want just a simple Login without the cookies and without the sessionhash ( this isnt really needed ) you can make just a simple session login. Just try to do, but bevor all add a copy of global.php in a save directory
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:30 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.03725 seconds
  • Memory Usage 2,188KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete