View Full Version : how to make user logged in automatically
spatel
05-18-2008, 11:10 PM
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
veenuisthebest
05-19-2008, 02:28 AM
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.
spatel
05-19-2008, 03:11 AM
yes, users have the same login info to the website and forum,
any help???
Thanks for replying
veenuisthebest
05-19-2008, 03:25 AM
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
http://www.domain.com/forums/index.php?$session[sessionurl]
spatel
05-19-2008, 03:38 AM
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
veenuisthebest
05-19-2008, 04:04 AM
what to have value of $session['sessionurl']?
no value, just suffix like that to index.php with ? as I stated earlier.
I have two different database for website user and vbulletin forum.
then it won't work, i think. The database must be same.
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 :)
spatel
05-19-2008, 04:13 AM
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.
<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
veenuisthebest
05-19-2008, 04:36 AM
I am looking for something same as calling datamanager object to insert into databasedon'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 (https://vborg.vbsupport.ru/showthread.php?t=173698&highlight=login). 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?
spatel
05-19-2008, 04:44 AM
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.
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
GameWizard
05-19-2008, 12:50 PM
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.
spatel
05-21-2008, 03:43 AM
thanks for ur views but our support is based on some of our software and v dont want them to make available to user other than our clients.
GameWizard
05-21-2008, 08:42 AM
But how do you separate your clients from non-users? I am confused here. If every single person is 'auto-logged in' then what's the difference from simply applying the same permissions to the guest/non-logged in group?
spatel
05-26-2008, 12:36 AM
every person is not auto logged in.
actually when user loggs in to our website, we stores their records, and if and only if he has permission to view forums, he will be auto logged in to the forums.
GameWizard
05-26-2008, 09:14 AM
What records are you referring to? Because besides IP addresses, it's difficult to limit access without an actual login being provided for the users.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.