Improve signon-script example
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
616e732c37
commit
3eccb9eb26
@ -23,7 +23,15 @@
|
||||
*/
|
||||
function get_login_credentials($user)
|
||||
{
|
||||
return array('root', '');
|
||||
/* Optionally we can use passed username */
|
||||
if (!empty($user)) {
|
||||
return array($user, 'password');
|
||||
}
|
||||
|
||||
/* Here we would retrieve the credentials */
|
||||
$credentials = array('root', '');
|
||||
|
||||
return $credentials;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -133,12 +133,12 @@ class PMA_AuthenticationSignon_Test extends PHPUnit_Framework_TestCase
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'root',
|
||||
'user',
|
||||
$GLOBALS['PHP_AUTH_USER']
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
'',
|
||||
'password',
|
||||
$GLOBALS['PHP_AUTH_PW']
|
||||
);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user