vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   how to make user logged in automatically (https://vborg.vbsupport.ru/showthread.php?t=179734)

spatel 05-18-2008 11:10 PM

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

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

Code:

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

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 :)

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.

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

veenuisthebest 05-19-2008 04:36 AM

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?

spatel 05-19-2008 04:44 AM

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

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.


All times are GMT. The time now is 01:03 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.01869 seconds
  • Memory Usage 1,749KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete