|
@@ -71,14 +71,14 @@ final class Session {
|
|
Plugins::get()->activate(__METHOD__, 0, func_get_args());
|
|
Plugins::get()->activate(__METHOD__, 0, func_get_args());
|
|
|
|
|
|
$username_crypt = crypt($username, Settings::get()['username']);
|
|
$username_crypt = crypt($username, Settings::get()['username']);
|
|
- $password = crypt($password, Settings::get()['password']);
|
|
+ $password_crypt = crypt($password, Settings::get()['password']);
|
|
|
|
|
|
|
|
|
|
if (Settings::get()['username']===$username_crypt&&
|
|
if (Settings::get()['username']===$username_crypt&&
|
|
- Settings::get()['password']===$password) {
|
|
+ Settings::get()['password']===$password_crypt) {
|
|
$_SESSION['login'] = true;
|
|
$_SESSION['login'] = true;
|
|
$_SESSION['identifier'] = Settings::get()['identifier'];
|
|
$_SESSION['identifier'] = Settings::get()['identifier'];
|
|
- Log::notice(Database::get(), __METHOD__, __LINE__, 'User ['.$username.'] has logged in from ['.$_SERVER['REMOTE_ADDR'].']');
|
|
+ Log::notice(Database::get(), __METHOD__, __LINE__, 'User (' . $username . ') has logged in from ' . $_SERVER['REMOTE_ADDR']);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -88,7 +88,9 @@ final class Session {
|
|
|
|
|
|
Plugins::get()->activate(__METHOD__, 1, func_get_args());
|
|
Plugins::get()->activate(__METHOD__, 1, func_get_args());
|
|
|
|
|
|
- Log::error(Database::get(), __METHOD__, __LINE__, 'User ['.$username.'] has tried to log in from ['.$_SERVER['REMOTE_ADDR'].']');
|
|
+
|
|
|
|
+ Log::error(Database::get(), __METHOD__, __LINE__, 'User (' . $username . ') has tried to log in from ' . $_SERVER['REMOTE_ADDR']);
|
|
|
|
+
|
|
return false;
|
|
return false;
|
|
|
|
|
|
}
|
|
}
|