mirror of
https://github.com/vrana/adminer.git
synced 2026-08-26 20:56:45 +02:00
List authentications
This commit is contained in:
@@ -285,6 +285,23 @@ function set_session($key, $val) {
|
||||
$_SESSION[$key][DRIVER][SERVER][$_GET["username"]] = $val; // used also in auth.inc.php
|
||||
}
|
||||
|
||||
/** Get authenticated URL
|
||||
* @param string
|
||||
* @param string
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function auth_url($driver, $server, $username) {
|
||||
global $drivers;
|
||||
preg_match('~([^?]*)\\??(.*)~', remove_from_uri(implode("|", array_keys($drivers)) . "|username|" . session_name()), $match);
|
||||
return "$match[1]?"
|
||||
. (SID ? SID . "&" : "")
|
||||
. ($driver != "server" || $server != "" ? urlencode($driver) . "=" . urlencode($server) . "&" : "")
|
||||
. "username=" . urlencode($username)
|
||||
. ($match[2] ? "&$match[2]" : "")
|
||||
;
|
||||
}
|
||||
|
||||
/** Send Location header and exit
|
||||
* @param string null to only set a message
|
||||
* @param string
|
||||
|
||||
Reference in New Issue
Block a user