Ya, the namespace is a problem... One way around it is to limit the vb name space... you want to make sure there are no spaces etc... i just do it in the vbulletin register.php file in vb...
---
Another point:
Not sure what the error was in the original code, BUT even after using the code by weeno, i get this error the FIRST time a user logs in (with the correct password)
Quote:
Fatal error: Call to a member function on a non-object in /home/sitename/public_html/wiki/includes/SpecialUserlogin.php on line 314
|
the user is actually created, but this error still comes up... not sure why... the user can then login.. i am isung mediawiki 1.5 and vb 3.5...
Thx.
Quote:
Originally Posted by weeno
I've been trying to use this code to integrate a wiki and vbulletin.
There's a mistake in the initUser function... note the database query isn't correct. I fixed it here:
HTML Code:
function initUser( &$user ) {
$vb_find_user_query = "SELECT email FROM user WHERE LOWER(username)=LOWER('" .
addslashes($user->mName) . "')";
$vb_find_result = mysql_query($vb_find_user_query, $this->vb_database);
if(mysql_num_rows($vb_find_result) == 1) {
$vb_user_info = mysql_fetch_array($vb_find_result);
$user->mEmail = $vb_user_info['email'];
}
else {
// ERROR?
}
}
is no one else working on this/ interested in this?
So, it seems the "_" underscore is the one of the forbidden chars in mediawiki.... so might cause some collision issues with vb's user database.
still working on this to see how to best resolve these issues.
arn
|