mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Removed code that was previously commented out
This commit is contained in:
@ -91,8 +91,6 @@ if ((isset($_SESSION['username'])) || (isset($_COOKIE['sess_id'],$_COOKIE['token
|
|||||||
setcookie("token", $token_id, time()+60*60*24*$config['auth_remember'], "/", null, null, true);
|
setcookie("token", $token_id, time()+60*60*24*$config['auth_remember'], "/", null, null, true);
|
||||||
setcookie("auth", $auth, time()+60*60*24*$config['auth_remember'], "/", null, null, true);
|
setcookie("auth", $auth, time()+60*60*24*$config['auth_remember'], "/", null, null, true);
|
||||||
dbInsert(array('session_username' => $_SESSION['username'], 'session_value' => $sess_id, 'session_token' => $token, 'session_auth' => $auth, 'session_expiry' => time()+60*60*24*$config['auth_remember']), 'session');
|
dbInsert(array('session_username' => $_SESSION['username'], 'session_value' => $sess_id, 'session_token' => $token, 'session_auth' => $auth, 'session_expiry' => time()+60*60*24*$config['auth_remember']), 'session');
|
||||||
//setcookie("username", $_SESSION['username'], time()+60*60*24*100, "/");
|
|
||||||
//setcookie("password", $_SESSION['password'], time()+60*60*24*100, "/");
|
|
||||||
}
|
}
|
||||||
if (isset($_COOKIE['sess_id'],$_COOKIE['token'],$_COOKIE['auth']))
|
if (isset($_COOKIE['sess_id'],$_COOKIE['token'],$_COOKIE['auth']))
|
||||||
{
|
{
|
||||||
|
@ -90,7 +90,6 @@ function generateSalt($max = 15)
|
|||||||
|
|
||||||
function changepassword($username,$password)
|
function changepassword($username,$password)
|
||||||
{
|
{
|
||||||
//$encrypted = crypt($password,'$1$' . generateSalt(8).'$');
|
|
||||||
$hasher = new PasswordHash(8, FALSE);
|
$hasher = new PasswordHash(8, FALSE);
|
||||||
$encrypted = $hasher->HashPassword($password);
|
$encrypted = $hasher->HashPassword($password);
|
||||||
return dbUpdate(array('password' => $encrypted), 'users', '`username` = ?', array($username));
|
return dbUpdate(array('password' => $encrypted), 'users', '`username` = ?', array($username));
|
||||||
@ -105,7 +104,6 @@ function adduser($username, $password, $level, $email = "", $realname = "", $can
|
|||||||
{
|
{
|
||||||
if (!user_exists($username))
|
if (!user_exists($username))
|
||||||
{
|
{
|
||||||
//$encrypted = crypt($password,'$1$' . generateSalt(8).'$');
|
|
||||||
$hasher = new PasswordHash(8, FALSE);
|
$hasher = new PasswordHash(8, FALSE);
|
||||||
$encrypted = $hasher->HashPassword($password);
|
$encrypted = $hasher->HashPassword($password);
|
||||||
return dbInsert(array('username' => $username, 'password' => $encrypted, 'level' => $level, 'email' => $email, 'realname' => $realname, 'can_modify_passwd' => $can_modify_passwd), 'users');
|
return dbInsert(array('username' => $username, 'password' => $encrypted, 'level' => $level, 'email' => $email, 'realname' => $realname, 'can_modify_passwd' => $can_modify_passwd), 'users');
|
||||||
|
Reference in New Issue
Block a user