mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
more auth fixes from lenwe.
git-svn-id: http://www.observium.org/svn/observer/trunk@2222 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -60,18 +60,9 @@ else
|
||||
|
||||
$auth_success = 0;
|
||||
|
||||
if (isset($_SESSION['username']) or ($config['auth_mechanism'] == 'http-auth' and !isset($_GET['logout'])))
|
||||
if (isset($_SESSION['username']))
|
||||
{
|
||||
if($config['auth_mechanism'] == 'http-auth')
|
||||
{
|
||||
$authenticateResult = authenticate(false,false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$authenticateResult = authenticate($_SESSION['username'],$_SESSION['password']);
|
||||
}
|
||||
|
||||
if ($authenticateResult)
|
||||
if (authenticate($_SESSION['username'],$_SESSION['password']))
|
||||
{
|
||||
$_SESSION['userlevel'] = get_userlevel($_SESSION['username']);
|
||||
$_SESSION['user_id'] = get_userid($_SESSION['username']);
|
||||
|
@ -1,5 +1,10 @@
|
||||
<?php
|
||||
|
||||
if(!isset($_SESSION['username']))
|
||||
{
|
||||
$_SESSION['username'] = '';
|
||||
}
|
||||
|
||||
function authenticate($username,$password)
|
||||
{
|
||||
global $config;
|
||||
@ -71,4 +76,4 @@ function deluser($username)
|
||||
return 0;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Reference in New Issue
Block a user