The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi,
I need some help. I have the lastest version or the forums (3) running on my server and I have a large database of users. I am now developing a new application but I only want to have ONE login, and basically use the login information and users from the forum. I presume this is possible. I can see the information in the users table in the database. My question is really how are the sessions done when a user logs in? I'm pretty new to the PHP code for the forum and haven't done any hacks to it yet, so wondered if anyone could point me in the right direction. Can I just query $_SESSION['username'] or something like that? Would be nice if it was that simple :ninja: Thanks, Tom |
#2
|
|||
|
|||
![]()
I'd just require_once(path/global.php); or something in the php file.
|
#3
|
|||
|
|||
![]() Quote:
THanks for the help, i'm a bit confused ![]() |
#4
|
||||
|
||||
![]()
$bbuserinfo['userid] and $bbuserinfo['username']
If you want to be independent from vBulletin backend you must (if existant) check the cookies bbuserid and bbpassword against the user table. Or the username and password entered in your application, if it also does provide login. |
#5
|
|||
|
|||
![]() Quote:
i.e. after grabbing the file make them login which is something like.... PHP Code:
|
#6
|
|||
|
|||
![]()
ok thanks, that makes sense, i'll give it a go.
One more thing though, I have my forum running under /forums/ on my server. My other application is running under /apd/. Do I have to move this to /forums/apd/ because I tried require_once('../forums/global.inc'); and it gave me this error. Warning: main(./includes/init.php): failed to open stream: No such file or directory in /home/gadseek/public_html/forums/global.php on line 50 Fatal error: main(): Failed opening required './includes/init.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gadseek/public_html/forums/global.php on line 50 I guess this is probably because under a different directory right? |
#7
|
|||
|
|||
![]()
something like...
PHP Code:
|
#8
|
|||
|
|||
![]()
cheers that does work, thanks!
![]() Although having problems now because the login form it redirects me to tries to run login.php under the /apd/ directory. But I will sort that by hardcoding the form action to be /forums/login.php, rather than just login.php, which should sort it. Will just have to remember I changed that if I ever move the forums. Next problem though is finding where in the distribution the form HTML code is! ![]() |
#9
|
|||
|
|||
![]()
ok I give up. Where can I find the HTML code which is generated on call to print_no_permission(); so I can edit the form action='login.php' to be form action='/forums/login.php'
Is it even stored on disk as a file, or in the database? Cheers, |
#10
|
|||
|
|||
![]()
Check out the includes/functions.php
You will find the print_no_permission function there. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|