Jump to content
  • 0

Force Change Password


Deku

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   1
  • Joined:  11/10/14
  • Last Seen:  

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 Deku
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

	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.

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

~

---------------------------------------

*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.

  • Love 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...