Баги в регистрации.

This commit is contained in:
2023-01-06 21:26:10 +02:00
parent d8063d8900
commit 6794284497
2 changed files with 24 additions and 28 deletions
+1 -2
View File
@@ -98,14 +98,13 @@ class UserRegister
public static function new(string $login, string $password, string $email, $ref, $birthday, $sex): string
{
$password = password_hash($password, PASSWORD_DEFAULT);
$ref = (int)$ref;
$ip = UserIp::get();
$sex = (int)$sex - 10; //Íà âõîäå 10\11, à ïåðåäàòü íàäî 0\1.
Db::sql(
'insert into users (users.real,login,host_reg,pass,ip,ipreg,room,timereg,mail,bithday,sex,fnq,molch2,level,hobby,clan_zv) values (1,?,?,?,?,?,9,unix_timestamp(),?,?,?,0,unix_timestamp() + 86400,8,\'\',0)',
[
$login,
$ref,
$ref ?? '',
$password,
$ip,
$ip,