From 7a1b75eba91fc67520f4209aea2f068285c912d1 Mon Sep 17 00:00:00 2001 From: rurban Date: Wed, 30 May 2007 21:53:52 +0000 Subject: [PATCH] add userid to authcreate git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@5716 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/WikiUser/AdoDb.php | 7 +++++-- lib/WikiUser/PearDb.php | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/WikiUser/AdoDb.php b/lib/WikiUser/AdoDb.php index f52abc2fa..92ea62adc 100644 --- a/lib/WikiUser/AdoDb.php +++ b/lib/WikiUser/AdoDb.php @@ -1,5 +1,5 @@ _authcreate) and $dbi->getAuthParam('auth_create')) { $this->_authcreate = $this->prepare($dbi->getAuthParam('auth_create'), - array("userid", "password")); + array("password", "userid")); } if (!empty($this->_authcreate) and isset($GLOBALS['HTTP_POST_VARS']['auth']) and @@ -275,6 +275,9 @@ extends _DbPassUser } // $Log: not supported by cvs2svn $ +// Revision 1.9 2006/12/22 17:25:23 rurban +// forgot why +// // Revision 1.8 2006/03/19 16:26:40 rurban // fix DBAUTH arguments to be position independent, fixes bug #1358973 // diff --git a/lib/WikiUser/PearDb.php b/lib/WikiUser/PearDb.php index 0a52b6f17..302981d6f 100644 --- a/lib/WikiUser/PearDb.php +++ b/lib/WikiUser/PearDb.php @@ -1,5 +1,5 @@ simpleQuery(sprintf($this->_authcreate, - $dbh->quote($passwd), + $dbh->simpleQuery(sprintf($this->_authcreate, + $dbh->quote($passwd), $dbh->quote($this->_userid))); return true; } @@ -187,7 +187,7 @@ extends _DbPassUser $result = $this->_checkPass($submitted_password, $stored_password); } else { // be position independent - $okay = $dbh->getOne(sprintf($this->_authselect, + $okay = $dbh->getOne(sprintf($this->_authselect, $dbh->quote($submitted_password), $dbh->quote($this->_userid))); $result = !empty($okay); @@ -237,6 +237,9 @@ extends _DbPassUser } // $Log: not supported by cvs2svn $ +// Revision 1.10 2006/03/19 16:26:40 rurban +// fix DBAUTH arguments to be position independent, fixes bug #1358973 +// // Revision 1.9 2005/10/10 19:43:49 rurban // add DBAUTH_PREF_INSERT: self-creating users. by John Stevens // -- 2.45.0