1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-03-01 16:20:36 +01:00

For 7.4 compatibility

This commit is contained in:
Lorenzo Yario 2024-12-22 14:05:42 -06:00 committed by GitHub
parent 6a22a51a72
commit 29ee5aeb1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@ use Vichan\Functions\Net;
defined('TINYBOARD') or exit; defined('TINYBOARD') or exit;
// create a hash/salt pair for validate logins // create a hash/salt pair for validate logins
function mkhash(string $username, ?string $password, mixed $salt = false): array|string { function mkhash(string $username, $password = null, $salt = false) {
global $config; global $config;
if (!$salt) { if (!$salt) {
@ -79,7 +79,7 @@ function calc_cookie_name(bool $is_https, bool $is_path_jailed, string $base_nam
} }
} }
function login(string $username, string $password): array|false { function login(string $username, string $password) {
global $mod, $config; global $mod, $config;
$query = prepare("SELECT `id`, `type`, `boards`, `password`, `version` FROM ``mods`` WHERE BINARY `username` = :username"); $query = prepare("SELECT `id`, `type`, `boards`, `password`, `version` FROM ``mods`` WHERE BINARY `username` = :username");