PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » Auth » Bug #10059

Columns in capital

Details

Doc Bug #10059Columns in capital
Submitted2007-02-08 19:57 UTC
Fromtom dot aerden at gmail dot com
Assignedaharvey
StatusClosed
PackageAuth
PHP Version4.4.4
OSLinux
Roadmaps(Not assigned)

Comments

[2007-02-08 19:57 UTC] tom dot aerden at gmail dot com

Description:
------------
When using Auth with MDB2 and MySQL, column names cannot be specified in upper case letters (when the columns are defined in de DB with upper case letters). Login seems impossible unless the column names are changed into lower case letters.

Test script:
---------------
function createAuth() {
$options = array(
"dsn" => DB_DSN_DEFAULT,
"table" => DB_TABLE_LOGIN,
"usernamecol" => "USERNAME",
"passwordcol" => "PASSWORD"
);

$auth = new Auth($options);
return $auth;
}

$auth = SecurityManager::createAuth();
$auth->start();
if($auth->checkAuth()) { // }

CREATE TABLE `DNC_LOGIN` (
`ID` int(11) NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(128) NOT NULL default '',
`LEVEL` smallint(6) default '0',
PRIMARY KEY (`ID`),
UNIQUE KEY `USERNAME` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

Expected result:
----------------
No user login, always returned to the login screen.