From 7186bd86ee7e1bcae9e01146159847f9a582acdc Mon Sep 17 00:00:00 2001 From: xiaomlove <1939737565@qq.com> Date: Wed, 27 Nov 2024 13:53:12 +0800 Subject: [PATCH] fix takesignup fire event --- public/takesignup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/takesignup.php b/public/takesignup.php index 4c4f43c9..4e6067dc 100644 --- a/public/takesignup.php +++ b/public/takesignup.php @@ -170,7 +170,7 @@ if(mysql_num_rows($res_check_user) == 1) $ret = sql_query("INSERT INTO users (username, passhash, passkey, secret, editsecret, email, country, gender, status, class, invites, ".($type == 'invite' ? "invited_by," : "")." added, last_access, lang, stylesheet".($showschool == 'yes' ? ", school" : "").", uploaded) VALUES (" . $wantusername . "," . $wantpasshash . "," . sqlesc($passkey) . "," . $secret . "," . $editsecret . "," . $email . "," . $country . "," . $gender . ", 'pending', ".$defaultclass_class.",". $invite_count .", ".($type == 'invite' ? "'$inviter'," : "") ." '". date("Y-m-d H:i:s") ."' , " . " '". date("Y-m-d H:i:s") ."' , ".$sitelangid . ",".$defcss.($showschool == 'yes' ? ",".$school : "").",".($iniupload_main > 0 ? $iniupload_main : 0).")") or sqlerr(__FILE__, __LINE__); $id = mysql_insert_id(); -fire_event("user_created", \App\Models\User::query()->first($id, \App\Models\User::$commonFields)); +fire_event("user_created", \App\Models\User::query()->find($id, \App\Models\User::$commonFields)); $tmpInviteCount = get_setting('main.tmp_invite_count'); if ($tmpInviteCount > 0) { $userRep = new \App\Repositories\UserRepository();