Version 0.9.5 beta - added account activation on the auth extension in the core, now users can be enabled and disabled by standard.

This commit is contained in:
Stephan Kasdorf
2020-09-07 21:26:20 +02:00
parent ff466d1c98
commit 016811c414

View File

@@ -52,8 +52,8 @@ class Auth extends Controller implements IAuth
if(!array_key_exists('auth', $_SESSION))
{
$user_password = Pdo::query("SELECT DES_DECRYPT(user_pass, '".Config::getInstance()->getConfig()[IView::NIBIRU_SECURITY]["password_hash"]."') AS pass FROM user WHERE user_login = '".$login."';");
if( $user_password["pass"] == $password )
$user_password = Pdo::query("SELECT user_account_active, DES_DECRYPT(user_pass, '".Config::getInstance()->getConfig()[IView::NIBIRU_SECURITY]["password_hash"]."') AS pass FROM user WHERE user_login = '".$login."';");
if( $user_password["pass"] == $password && $user_password['user_account_active'] )
{
$session_id = session_id();
$_SESSION['auth']['id'] = $session_id;