I have a probably rather stupid newbie installation question.
I am trying to configure phpwiki (1.3.4) to use an existing table of users
and crypts stored in a mySQL DB for external authentication.
I have configure the authenification in index.php as:
if (!defined('ALLOW_HTTP_AUTH_LOGIN')) define('ALLOW_HTTP_AUTH_LOGIN',
false);
if (!defined('ALLOW_USER_LOGIN')) define('ALLOW_USER_LOGIN', true);
if (!defined('ALLOW_BOGO_LOGIN')) define('ALLOW_BOGO_LOGIN', false);
if (!defined('REQUIRE_SIGNIN_BEFORE_EDIT'))
define('REQUIRE_SIGNIN_BEFORE_EDIT', true);
if (!defined('ALLOW_LDAP_LOGIN')) define('ALLOW_LDAP_LOGIN', false);
if (!defined('ALLOW_IMAP_LOGIN')) define('ALLOW_IMAP_LOGIN', false);
$DBAuthParams = array(
'auth_dsn' => 'mysql://username:password@host/phpwiki',
'auth_check' => 'SELECT passwd FROM yabbse_members WHERE
memberName="$userid"',
'auth_crypt_method' => 'crypt',
'dummy' => false,
);
The auth_dsn is the same as the dsn (which works fine). The passwords in the
mySQL DB are encrypted using crypt (with the first two characters of the
password as the salt).
With these settings if I try to log in as any user I only get "invalid
password or userid".
The login appears to be failing at the call to: exists($userid) at which
point the exists($userid) of WikiUser.php is called (shouldn't the exists
function of WikiDB_User class override this???) which returns false so I
don't think any queries for user authentifiaction are run on the DB at all.
Any assistance for what I am missing and what should be changed/added to
allow authentification against this data would be greatly appreciated.
Thanks,
Jerome
|