mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Lots of additions.
git-svn-id: http://www.observium.org/svn/observer/trunk@108 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -22,12 +22,13 @@ if($_GET['logout']) {
|
||||
$encrypted=$_COOKIE['encrypted'];
|
||||
}
|
||||
|
||||
$sql = "select username, level from users where username='$_SESSION[username]' and password='$encrypted'";
|
||||
$sql = "select username, level, user_id from users where username='$_SESSION[username]' and password='$encrypted'";
|
||||
$row = mysql_fetch_row(mysql_query($sql));
|
||||
|
||||
if ( $_SESSION['username'] != "" && $row[0] == $_SESSION['username'] ) {
|
||||
$_SESSION['userlevel'] = $row[1];
|
||||
$_SESSION['authenticated'] = true;
|
||||
$_SESSION['user_id'] = $row[2];
|
||||
setcookie("username", $username);
|
||||
setcookie("encrypted", $encrypted);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user