vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Logging in on user database from oter location than forum (https://vborg.vbsupport.ru/showthread.php?t=71387)

Audience 11-05-2004 02:47 PM

Logging in on user database from oter location than forum
 
Hi,

i'm coding a website and i want to use the user database of my forum... so the users have to register one to use both...
but i don't get how i have to fix they could login from my website... i don't get how the fix it with the md5 security vBulletin uses...
It would also be great if they could register when they are on the website (not on the forum)...

Can someone help me out?

Andreas 11-05-2004 03:01 PM

The "password" stored in the user-table is md5(concat(md5('password'), salt)).

So if you want to check if password bar for user foo is correct:

[sql]SELECT userid, password=MD5(CONCAT(MD5('bar'), salt)) AS pwdcorrect FROM user WHERE username='foo'[/sql]
  • if this does return 0 rows, the username was wrong.
  • if it does return a row and pwdcorrect is 0 then the password was wrong
  • if it does return a row and pwdcorrect is 1 then the username/password combination is valid

Audience 11-05-2004 03:38 PM

you're my angel today :)

Audience 11-05-2004 03:49 PM

hmm concat is a function of vB?
In which file is it so i can copy it ?

Andreas 11-05-2004 03:57 PM

CONCAT() is a mySQL function.

To concatenate strings in PHP you can use .

PHP Code:

$foobar 'foo' 'bar';
echo 
$foobar

results in foobar being printed out.


All times are GMT. The time now is 10:39 AM.

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.01012 seconds
  • Memory Usage 1,715KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete