Wiki login is now your forum password
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Wiki login is now your forum password
The Wiki authentication procedure has changed and you now must use your forum username / password to log in to the wiki. By having a forum user you should automatically be able to log in on the wiki. I'm going to disable the password change feature on the wiki since it no longer has any purpose.
Let me know if there are any issues.
Let me know if there are any issues.
Last edited by sinbad on Thu Sep 22, 2005 10:25 pm, edited 1 time in total.
- SuprChikn
- Bugbear
- Posts: 863
- Joined: Tue Apr 19, 2005 6:10 am
- Location: Melbourne, Aus
- Contact:
- Antiarc
- Greenskin
- Posts: 120
- Joined: Thu Jan 23, 2003 8:40 am
- Contact:
- Aklix
- Goblin
- Posts: 222
- Joined: Mon Dec 27, 2004 5:21 am
- Contact:
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- Game_Ender
- Ogre Magi
- Posts: 1269
- Joined: Wed May 25, 2005 2:31 am
- Location: Rockville, MD, USA
Can't Login
I can't seem to log in with my forum name "Game_Ender". Everytime I try it says there is no user by the name "Game Ender" (note no underscore). There is a user by the name "GameEnder", but my password doens't work and when I requested a password be emailed to me I didn't get it at my email address.
It seems the wiki doesn't like "_" but the forum software doesn't care.
Any help here?
It seems the wiki doesn't like "_" but the forum software doesn't care.
Any help here?
-
- Kobold
- Posts: 26
- Joined: Tue Apr 12, 2005 9:39 pm
- Location: Paris - France
- Contact:
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- joshcryer
- Gnome
- Posts: 351
- Joined: Wed Oct 13, 2004 8:22 am
sinbad, could you PM or email me the method you used to get this hack to work? I would like to add it to my forums at www.newmars.com, I'd really appreciate it!
my email is joshcryer (at) gmail
PS I know you're a busy guy so feel free to wait until you have actual leisure time, no rush.
my email is joshcryer (at) gmail
PS I know you're a busy guy so feel free to wait until you have actual leisure time, no rush.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Here it is for anyone who might want it. It's pretty noddy stuff, and I'm no fan of PHP, but maybe it will help.
extensions/phpBBAuthPlugin/phpBBAuthPlugin.php:
Add to your LocalSettings.php:
extensions/phpBBAuthPlugin/phpBBAuthPlugin.php:
Code: Select all
<?php
// Mediawiki authentication plugin for phpBB2 with mysql4
// By Steve Streeting 23 June 2005
require_once('AuthPlugin.php');
// Set the location of your phpBB folder relative to the wiki root
$PHPBB_LOCATION = "../phpBB2";
require_once($PHPBB_LOCATION . "/config.php");
class AuthPhpBB extends AuthPlugin
{
function AuthPhpBB() {
}
function connectdb() {
global $dbhost, $dbuser, $dbpasswd, $dbname;
$dbconnection = mysql_connect($dbhost, $dbuser, $dbpasswd)
or die('AuthPhpBB : Could not connect: ' . mysql_error());
mysql_select_db($dbname, $dbconnection) or die('AuthPhpBB : Could not select database');
return $dbconnection;
}
/**
* Check whether there exists a user account with the given name.
* The name will be normalized to MediaWiki's requirements, so
* you might need to munge it (for instance, for lowercase initial
* letters).
*
* @param string $username
* @return bool
* @access public
*/
function userExists( $username ) {
global $table_prefix;
$dbconnection = $this->connectdb();
// MySQL queries are case insensitive anyway
$query = "select username from ".$table_prefix."users where username ='". $username ."'";
$result = mysql_query($query, $dbconnection)
or die('Query failed: ' . mysql_error());
$numrows = mysql_num_rows($result);
// Free resultset
mysql_free_result($result);
return $numrows > 0;
}
/**
* Check if a username+password pair is a valid login.
* The name will be normalized to MediaWiki's requirements, so
* you might need to munge it (for instance, for lowercase initial
* letters).
*
* @param string $username
* @param string $password
* @return bool
* @access public
*/
function authenticate( $username, $password ) {
global $table_prefix;
$dbconnection = $this->connectdb();
$query = "select user_password from ".$table_prefix."users where username ='". $username ."'";
$result = mysql_query($query, $dbconnection)
or die('Query failed: ' . mysql_error());
if (mysql_num_rows($result) == 0)
{
return false;
}
else
{
$row = mysql_fetch_row($result);
if ($row[0] == md5($password))
{
return true;
}
else
{
return false;
}
}
}
/**
* Return true if the wiki should create a new local account automatically
* when asked to login a user who doesn't exist locally but does in the
* external auth database.
*
* This is just a question, and shouldn't perform any actions.
*
* @return bool
* @access public
*/
function autoCreate() {
return true;
}
/**
* Return true to prevent logins that don't authenticate here from being
* checked against the local database's password fields.
*
* This is just a question, and shouldn't perform any actions.
*
* @return bool
* @access public
*/
function strict() {
return true;
}
/**
* When creating a user account, optionally fill in preferences and such.
* For instance, you might pull the email address or real name from the
* external user database.
*
* The User object is passed by reference so it can be modified; don't
* forget the & on your function declaration.
*
* @param User $user
* @access public
*/
function initUser( &$user ) {
global $table_prefix;
$dbconnection = $this->connectdb();
// Just add email
$query = "select user_email from ".$table_prefix."users where username ='". $user->mName ."'";
$result = mysql_query($query, $dbconnection)
or die('Query failed: ' . mysql_error());
if (mysql_num_rows($result) > 0)
{
$row = mysql_fetch_row($result);
$user->mEmail = $row[0];
}
}
}
?>
Code: Select all
# Use phpBB Authentication
require_once( 'extensions/phpbbAuthPlugin/phpBBAuthPlugin.php' );
$wgAuth = new AuthPhpBB();
- fog
- Greenskin
- Posts: 149
- Joined: Sun Sep 19, 2004 6:00 pm
- Location: Torino, ITALY
- Contact:
unable to login
When I try to login (or I ask for my password) using "fog" the wiki tells me there is no "Fog" (note the capital F) user. What should I do?
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- fog
- Greenskin
- Posts: 149
- Joined: Sun Sep 19, 2004 6:00 pm
- Location: Torino, ITALY
- Contact:
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
- c_dd2
- Halfling
- Posts: 79
- Joined: Sun Jul 10, 2005 11:40 am
- Location: Belgium
- Contact:
I have exactly the say problem as fog have/had
I have already had problems elsewhere with the underscore ("_") in my nickname... But when registering here phpBB never complained and logs in perfectly. Only the wiki causes me the log in process problem
Is there anyway to fix this embarrassing problem? Anything I can do?
Thank you in advance.
c_dd2
I have already had problems elsewhere with the underscore ("_") in my nickname... But when registering here phpBB never complained and logs in perfectly. Only the wiki causes me the log in process problem
(As with fog, notice the first letter being capital and also that my "_" has apparently disappeared... )There is no user by the name "C dd2". Check your spelling, or use the form below to create a new user account.
Is there anyway to fix this embarrassing problem? Anything I can do?
Thank you in advance.
c_dd2
"Who's the maddest of two? The mad or the one that's following him?"
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.
- c_dd2
- Halfling
- Posts: 79
- Joined: Sun Jul 10, 2005 11:40 am
- Location: Belgium
- Contact:
Ok, so far as there seems to be nothing that can be done for this problem, I created a second account "cdd2" which works fine for the wiki.
So it will be "c_dd2" (my real nickname) for the forum and "cdd2" (some kind of "proxy nickname" for now) for the wiki... Pretty useless and compicated and consumes lot of DB for nothing but that is the way it works...
It really is a pity that the forum/wiki integration has not been done correctly
So it will be "c_dd2" (my real nickname) for the forum and "cdd2" (some kind of "proxy nickname" for now) for the wiki... Pretty useless and compicated and consumes lot of DB for nothing but that is the way it works...
It really is a pity that the forum/wiki integration has not been done correctly
"Who's the maddest of two? The mad or the one that's following him?"
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
I already covered this. MediaWiki has stricter limits on user names than phpBB, which I haven't done anything about as yet. Feel free to chip in if you know better (the code is right there), I'm far too busy to mess about with this right now.c_dd2 wrote:It really is a pity that the forum/wiki integration has not been done correctly
- c_dd2
- Halfling
- Posts: 79
- Joined: Sun Jul 10, 2005 11:40 am
- Location: Belgium
- Contact:
Sorry sinbad, please do not get angry. It was just a constatation (I do not think this is an English world ) from the user's point of view, not meaning to be an offense to you or anyone else in any way.
As I am quite good with PHP and like that language very much (my second preferred language with C++), I am going to look at the MediaWiki's code and your phpBB plug-in and, if I find whatever interesting, tell you what cool thing could be done to get rid of that f*cking (and silly, anyway) limitation.
I hope this will help you and the future users who get stuck with their nicknames.
Thank you for all your work sinbad, and please accept my apologizes if I hurt you
Greetings.
Nota bene: The problem with characters is not a MySQL limitation but, as sinbad says, a MediaWiki's limitation. The proof is that phpBB accept them without even opening the mouth
As I am quite good with PHP and like that language very much (my second preferred language with C++), I am going to look at the MediaWiki's code and your phpBB plug-in and, if I find whatever interesting, tell you what cool thing could be done to get rid of that f*cking (and silly, anyway) limitation.
I hope this will help you and the future users who get stuck with their nicknames.
Thank you for all your work sinbad, and please accept my apologizes if I hurt you
Greetings.
Nota bene: The problem with characters is not a MySQL limitation but, as sinbad says, a MediaWiki's limitation. The proof is that phpBB accept them without even opening the mouth
"Who's the maddest of two? The mad or the one that's following him?"
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.
- c_dd2
- Halfling
- Posts: 79
- Joined: Sun Jul 10, 2005 11:40 am
- Location: Belgium
- Contact:
Humm, seems like I cannot get it working, sorry :s
I am not a MediaWiki guru... I do not find exactly and I have lots of difficulties with the i18n (internalization: UTF-8 and the like). Also, I am fight with OGRE, so I have no more time trying this. Sorry
I hope you will finally get it work, you surely knows it more than me
I am not a MediaWiki guru... I do not find exactly and I have lots of difficulties with the i18n (internalization: UTF-8 and the like). Also, I am fight with OGRE, so I have no more time trying this. Sorry
I hope you will finally get it work, you surely knows it more than me
"Who's the maddest of two? The mad or the one that's following him?"
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.
Quote from Obi-Wan Kenobi (Alec Guinness), Star Wars Episode 4.