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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2005, 01:41 PM
dRiFT dRiFT is offline
 
Join Date: Oct 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Login + session table question

Hi, I'm working on a modified login for a vB forum, this is to get it using the same login details that already exist for the web site (email addy + password as opposed to username and password).

All that side of things is working fine, the site members automatically get a forum account created when they join and the first time they login in they're asked to specify a forum display name(custom template) which it then validates against the usual vB name rules. However if you choose not to bother specifying a name when asked and try and visit the forum front page it's logged you in and you're given the name 'unregistered' as the field's blank in the db. This is where the problem lies as I don't want anyone being able to access any member stuff without giving that display name.

So onto the solution...

What I'm trying to track down is the point at which the users session info has their userid added to it, so that if the display name is blank I can stop this being done and therefore they appear to still be logged out, until they return and actually bother to enter a forum name. It's proving to be a bit tricky when you can't get the forum to output any debug values simply. Has anyone tackled this kind of problem before? As always I'm trying to achieve this with the minimum number of mods to the system.
Reply With Quote
  #2  
Old 04-12-2005, 01:49 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Easy solution would be not to allow an empty username. And for debugging simple echo statements work great.
Reply With Quote
  #3  
Old 04-12-2005, 01:57 PM
dRiFT dRiFT is offline
 
Join Date: Oct 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have to allow an empty username to begin with, as the login details are their email address and password(I have already modded this part), which ties in with the main site. The blank username is then used to distinguish between those who have specified a forum name and those who haven't (a lot of our site members will never bother to use their forum account, but they have one anyway).

Echo statements break the forum pages so you end up with just a blank page, I believe this is because of how the templating works. I'm working with vB 3.0.7 btw, should have really said this at the start.
Reply With Quote
  #4  
Old 04-12-2005, 06:17 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If placed on the right place (for example not before the global.php) echo statements will not break up your page.

Then assign them a fake username you can recognize, for example: Reg999999 Where 999999 is the userid. If they want to use the forum, they can change to a real name.
Reply With Quote
  #5  
Old 04-13-2005, 07:35 AM
dRiFT dRiFT is offline
 
Join Date: Oct 2002
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry maybe I should be a bit more clear. The issue isn't the username, I can deal with that. All I'm trying to do is hunt down where in the login code their userid is being added to the session, which in turn makes them logged in. So until they do what they're told they're not going anywhere.

Solved...just needs testing.
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 07:39 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.05000 seconds
  • Memory Usage 2,194KB
  • 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
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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