info. * @param mixed $value Новое значение * @param ?int $code Проверочный код * @param string $type Тип меняемого значения. С маленькой буквы, именительный падеж. * @return void */ public static function byEmail(array $userinfo, string $type, $value, ?int $code = null) { if ($type === 'pass2' && is_null($code)) { self::pass2ByEmailCustom($userinfo, $value); return; } $ip = UserIp::get(); $date = date('d.m.y H:i'); $https = Config::get('https'); $support = Config::get('support'); $activationLink = 'https://' . $userinfo['city'] . Config::get('host') . "/confirm.php?id={$userinfo['id']}&code=$code"; $fulllogin = $userinfo['login'] . "[{$userinfo['level']}]"; Mail::send( $userinfo['mail'], << Сменить $type $date
Кто-то с IP: $ip пытается сменить $type к персонажу $fulllogin.
Т.к. в анкете у этого персонажа указан email: {$userinfo['mail']}, то вы и получили это письмо.
login: {$userinfo['login']}
Новый $type: $value

Для того чтобы сменить $type, перейдите по ссылке:
$activationLink

--
Бойцовский Клуб $https
Администрация Бойцовского Клуба: $support
P.S. Данное письмо сгенерировано автоматически, отвечать на него не нужно. HTML, "Смена $type у персонажа $fulllogin" ); } private static function pass2ByEmailCustom(array $userinfo, string $pass2) { $ip = UserIp::get(); $fulllogin = $userinfo['login'] . "[{$userinfo['level']}]"; Mail::send( $userinfo['mail'], << Второй пароль от персонажа $fulllogin. Вами, с IP адреса - $ip, был установлен второй пароль в игре Бойцовский Клуб.
Если это были не Вы, свяжитесь с администрацией сайта.

------------------------------------------------------------------
Ваш логин | {$userinfo['login']}
Второй пароль | ' . $pass2 . '
------------------------------------------------------------------


Желаем Вам приятной игры.

Администрация HTML, "Второй пароль от персонажа $fulllogin" ); } public static function userRegistrationCodeByEmail(string $email, string $login) { $code = PassGen::intCode(4); Db::sql('insert into secure_code (email, code, time) values (?,?,unix_timestamp())', [$email, $code]); Mail::send( $email, 'Секретный Код: ' . $code, 'Код подтверждения регистрации персонажа ' . $login ); } public static function byCode(int $uid, int $code): string { $status = ''; if ($uid <= 0 || $code <= 0) { return $status; } $codes = Db::getRow( 'select * from emailconfirmation where id = ? and code = ? and (active = 1 or pass = 1 or email = 1)', [$uid, $code] ); if (!$codes['id']) { $status = 'Ссылка устарела!'; } elseif ($codes['active'] === 1) { Db::sql( 'update users set emailconfirmation = 1, securetime = unix_timestamp() + 259200 where id = ?', [$codes['id']] ); $status = "Подтверждение смены пароля/email через почту включено"; } elseif ($codes['pass'] === 1) { Db::sql( 'update users as u inner join emailconfirmation as e on u.id = e.id set u.pass = e.pa_em, u.securetime = unix_timestamp() + 259200 where u.id = ?', [$codes['id']] ); $status = "Удачно сменили пароль<"; } elseif ($codes['email'] === 1) { Db::sql( 'update users as u inner join emailconfirmation as e on u.id = e.id set u.mail = e.pa_em, u.securetime = unix_timestamp() + 259200 where u.id = ?', [$codes['id']] ); $status = "Удачно сменили email"; } Db::sql('delete from emailconfirmation where id = ? and code = ?', [$_GET['id'], $_GET['code']]); if ($status) { $status = "

$status

"; } return $status; } }