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 05-18-2008, 11:10 PM
spatel spatel is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default how to make user logged in automatically

Hi,

I am new to PHP and vBulletin also so please help me.
I am sorry to post this thread at the wrong place at first instance. I hope this is the right place for this thread.

I want to make user logged in automatically when they go to forums from our website account.
is there anyway, I can do this??

Thanks in advance
Reply With Quote
  #2  
Old 05-19-2008, 02:28 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. are you sharing the database of your website and the forums ?? Does the users have the same login info to the website and forum?

2. If no, then I don't think you can do it..

3. what is the link to your forums and website ?? also the domain should be same as cookies cannot be shared over different domains.
Reply With Quote
  #3  
Old 05-19-2008, 03:11 AM
spatel spatel is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, users have the same login info to the website and forum,
any help???

Thanks for replying
Reply With Quote
  #4  
Old 05-19-2008, 03:25 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what is the link to your forums and website ?? also the domain should be same as cookies cannot be shared over different domains.

try linking your forums from your website like this

Code:
http://www.domain.com/forums/index.php?$session[sessionurl]
Reply With Quote
  #5  
Old 05-19-2008, 03:38 AM
spatel spatel is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am sorry but i m new to all this stuff and couldn't think what to have value of $session['sessionurl']?


I couldn't provide website link as i m just working on testing server right now, but am sending homepage link, which can help u more to understand my problem.
www.totalcare.net.au

I have two different database for website user and vbulletin forum.
I am calling datamanager object as stated in vBulletin manual to create new user to vbulletin database whenever I am creating new user for website database.

now I want system like that,--
user should logged in through website login system which is using website_user database.
and after getting logged in , whenever user click on the forum button he should be transferred to forums home page with logged in status.,
I think I need to post username and password to the login.php?do=login page, is it so???

any help?? thanks
Reply With Quote
  #6  
Old 05-19-2008, 04:04 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
what to have value of $session['sessionurl']?
no value, just suffix like that to index.php with ? as I stated earlier.

Quote:
I have two different database for website user and vbulletin forum.
then it won't work, i think. The database must be same.

Quote:
I think I need to post username and password to the login.php?do=login page, is it so???
try it and do reply if it works

by the way nice website, looks highly pro
Reply With Quote
  #7  
Old 05-19-2008, 04:13 AM
spatel spatel is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the website compliments,

it works for posting username, password and three other feilds on login.php?do=login

but the problem is i have to store the password in plain text format somewhere to post it on the login.php page as hidden variable or session variable, and I dont want to do that for security matter.
I am looking for something same as calling datamanager object to insert into database, same kind of mechanism or idea to check the username and password and make user logged in.

Quote:
<form action="login.php?do=login" method="post" >
<input type="text" name="vb_login_username" id="navbar_username" accesskey="u" tabindex="101" value="User Name" onfocus="if (this.value == 'User Name') this.value = '';" />

<input type="password" name="vb_login_password" id="navbar_password" tabindex="102" />

<input type="hidden" name="securitytoken" value="57c07616d871c2c5012061b399dedc6fe3767bf7" />
<input type="hidden" name="s" value="" />
<input type="hidden" name="do" value="login" />

<input type="submit" class="button" value="Log in" accesskey="s" />
</form>


I want automatic login so need to use hidden variable here instead of textbox, and it works but storing password in plain text kills me, and also it transfer to the page I go to the forum(history page), I need to have forum index page always when user is transfered to forums from normal website,

Thanks
Reply With Quote
  #8  
Old 05-19-2008, 04:36 AM
veenuisthebest's Avatar
veenuisthebest veenuisthebest is offline
 
Join Date: Mar 2008
Location: India
Posts: 1,416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
I am looking for something same as calling datamanager object to insert into database
don't know anything about datamanager object, maybe someone else could help you with that.

1. I'd recommend you using vB's database for your website as well so that if the user logs in to your website, he can easily navigate to forums page without losing his session plus your burden of managing 2 databases would be reduced. For this, why don't you create a Deluxe vB User login and access control on non vB pages. This way, you can easily integrate vB's login system on your site.

2. I don't see any register link at your website !! If someone registers at your website, his records get inserted in website's database as well as forums database, right? Is it vice versa?
Reply With Quote
  #9  
Old 05-19-2008, 04:44 AM
spatel spatel is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
I don't see any register link at your website !! If someone registers at your website, his records get inserted in website's database as well as forums database, right? Is it vice versa?
yes, it works like that, but our company is a small IT company and we are working to provide support to our registered clients on internet.
for this, we are not providing register facility to anyone else but it is for only admin people or internal staff to make someone register.

Quote:
I'd recommend you using vB's database for your website as well so that if the user logs in to your website, he can easily navigate to forums page without losing his session plus your burden of managing 2 databases would be reduced. For this, why don't you create a Deluxe vB User login and access control on non vB pages. This way, you can easily integrate vB's login system on your site.
we have some other software upgradation and knowledgebase software accessed by only perticular permission for user from our user table, so it is hard to use vbulletin db for the same,


thanks anyways
Reply With Quote
  #10  
Old 05-19-2008, 12:50 PM
GameWizard's Avatar
GameWizard GameWizard is offline
 
Join Date: Apr 2004
Location: Vancouver, BC
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wouldn't it just be easier to allow give the Guests the same permissions as Registered Members such as posting and viewing rights? That way it's just as if they are logged in, but minus the security risk of having them muck around the account.
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 04:18 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.04395 seconds
  • Memory Usage 2,257KB
  • 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)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete