29.12.2016, 14:36
(
Last edited by Gammix; 09/10/2017 at 05:05 PM.
)
Advance Login & Register System
MySQL and SQLite - v2.0 - last updated 5th Jan, 2017
MySQL and SQLite - v2.0 - last updated 5th Jan, 2017
- Dialogs based login and register. There is a limit on login attempts (default is 3) you can edit the limit in script:
PHP Code:#define MAX_LOGIN_ATTEMPTS 3
#define MAX_ACCOUNT_LOCKTIME 2 // in minutes - this is the time interval for locking the account when a user fails to login in Max Attempts given
- SECURE_PASSWORD_ONLY
This forces the user to have atleast 1 Lowercase, 1 Highercase and 1 Number in their password while registration or changing password.
Modify in script:
PHP Code://#define SECURE_PASSWORD_ONLY // this forces the user to have atleast 1 Lowercase, 1 Highercase and 1 Number in their password
- Per player based password salts, every player has their own SALT for SHA256 salt.
- When you are unsure about your login credentials, there is a button "OPTIONS" in login or register dialog:
- Forgot password: gives a dialog where you can answer your security question and reset password:
When you answer it right (note: you are given the same number of max tries as given in login)
- Forgot username: gives a dialog where you can get all the accounts that are registered on your IP Address (it cover IP range)!
- Forgot password: gives a dialog where you can answer your security question and reset password:
- This is what happens when you fail all login attempts:
The accounts gets temp locked for the given time "MAX_ACCOUNT_LOCKTIME" only for your IP. in case the original user isn't being abused by fake attempts from other IP.s.
You can also set the maximum login attempts via setting: (note this value also sets maximum attempts to reset password through answering security question)
PHP Code:#define MAX_LOGIN_ATTEMPTS 3
When you try to come back right after:
- /changepass
Change your account's password. (salt remains the same)
- /changeques
Change your account's security question and answer. (salt remains the same)
You can also add your own questions list by editing this constant array:
PHP Code:new const SECURITY_QUESTIONS[][MAX_SECURITY_QUESTION_SIZE] =
{
"What was your childhood nickname?", ...
};
- /stats
SQLite Version - https://github.com/Agneese-Saini/SA-...ase/sqlite.pwn
MySQL Version - https://github.com/Agneese-Saini/SA-...base/mysql.pwn
Libraries required:
zcmd.inc - https://sampforum.blast.hk/showthread.php?tid=576114
sscanf2.inc - https://sampforum.blast.hk/showthread.php?tid=602923
easydialog.inc - https://sampforum.blast.hk/showthread.php?tid=602886
kickban.inc - https://github.com/Agneese-Saini/SA-...kickbanfix.inc