mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 02:41:02 +01:00
fixed problem with http auth
This commit is contained in:
parent
25e0481da8
commit
87a292bd3d
17
login.php
17
login.php
@ -84,24 +84,23 @@
|
||||
deny_login();
|
||||
}
|
||||
|
||||
|
||||
if (isset($PHP_AUTH_USER)) {
|
||||
$submit = True;
|
||||
$login = $PHP_AUTH_USER;
|
||||
$passwd = $PHP_AUTH_PW;
|
||||
}
|
||||
|
||||
if (isset($submit) && $submit) {
|
||||
if (getenv(REQUEST_METHOD) != "POST") {
|
||||
if (getenv(REQUEST_METHOD) != "POST" && !isset($PHP_AUTH_USER)) {
|
||||
$phpgw->redirect($phpgw->link("","code=5"));
|
||||
}
|
||||
|
||||
$sessionid = $phpgw->session->create($login,$passwd);
|
||||
if (!isset($sessionid) || !$sessionid) {
|
||||
$phpgw->redirect($phpgw_info["server"]["webserver_url"]."/login.php?cd=5");
|
||||
} else {
|
||||
$phpgw->redirect($phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php", "cd=yes"));
|
||||
}
|
||||
}elseif (isset($PHP_AUTH_USER)) {
|
||||
$sessionid = $phpgw->session->create($PHP_AUTH_USER,$PHP_AUTH_PW);
|
||||
if (!isset($sessionid) || !$sessionid) {
|
||||
$phpgw->redirect($phpgw_info["server"]["webserver_url"]."/login.php?cd=5");
|
||||
} else {
|
||||
$phpgw->redirect($phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php", "cd=yes"));
|
||||
}
|
||||
} else {
|
||||
// !!! DONT CHANGE THESE LINES !!!
|
||||
// If there is something wrong with this code TELL ME!
|
||||
|
Loading…
Reference in New Issue
Block a user