Deku Posted May 18, 2020 Group: Members Topic Count: 4 Topics Per Day: 0.00 Content Count: 19 Reputation: 1 Joined: 11/10/14 Last Seen: December 16, 2024 Share Posted May 18, 2020 (edited) I would like to ask for an npc that will force the player to change his password as soon as he logs in, that the password change is mandatory thank you very much Edit: I am suspecting a database leak and wanted everyone to change their password in a safe way Edited May 19, 2020 by Deku Quote Link to comment Share on other sites More sharing options...
0 Start_ Posted May 19, 2020 Group: Members Topic Count: 26 Topics Per Day: 0.01 Content Count: 950 Reputation: 180 Joined: 04/05/13 Last Seen: 6 hours ago Share Posted May 19, 2020 mes "ID"; input .@inputId$; next; mes "Old PW"; input .@inputPw$; next; query_sql ("SELECT `account_id` FROM `login` WHERE `userid`='"+.@inputId$+"' AND `user_pass`='"+.@inputPw$+"'", .@sum); if(.@sum<=0){ mes "Incorrect ID or PW"; close; } next; mes "New PW"; input .@inputPw$; if(.@inputPw$!=""){ query_sql "UPDATE `login` SET `user_pass` = '"+.@inputPw$+"' WHERE `userid` = '"+.@inputId$+"'"; mes "Done"; close; } mes "Canceled"; end; This is simple password change scripts. you can adapt it. Quote Link to comment Share on other sites More sharing options...
0 sader1992 Posted May 19, 2020 Group: Content Moderator Topic Count: 55 Topics Per Day: 0.01 Content Count: 1691 Reputation: 716 Joined: 12/21/14 Last Seen: Yesterday at 01:31 PM Share Posted May 19, 2020 ~ --------------------------------------- *escape_sql(<value>) Converts the value to a string and escapes special characters so that it is safe to use in query_sql(). Returns the escaped form of the given value. Example: .@name$ = "John's Laptop"; .@esc_str$ = escape_sql(.@name$); // Escaped string: John\'s Laptop --------------------------------------- also it's better to create a script in the website , change the stat of all the accounts to prevent them from login and update the stat once they create a new password. 1 Quote Link to comment Share on other sites More sharing options...
Question
Deku
I would like to ask for an npc that will force the player to change his password as soon as he logs in, that the password change is mandatory
thank you very much
Edit: I am suspecting a database leak and wanted everyone to change their password in a safe way
Edited by DekuLink to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.