Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create New User Account
- -- Enter User information to these variables
- SET @str_username = 'CoolGuy'; -- Enter the username provided between the ''
- SET @str_password = 'SuperSecret'; -- Enter the password provied between the ''
- SET @str_UserIPAddress = '192.168.1.1'; -- Enter the IP Address of the user between the ''
- SET @int_AccessLevel = 0; -- Enter the access level for the user account
- -- 0=basic 3=advocate 4=sentinel 6=admin
- -- The following are static variables do not touch unless you know what you are doing.
- SET @str_password_salt = LOWER(conv(floor(rand() * 99999999999999), 20, 36));
- SET @str_password_hash = LEFT(SHA2(CONCAT(LOWER(@str_password),@str_password_salt),512),64);
- -- Add new account
- INSERT INTO `accounts` ( `username`, `password`, `password_salt`, `date_created`, `access`, `created_ip_address`) VALUES
- (@str_username, @str_password_hash, @str_password_salt, UNIX_TIMESTAMP(), @int_AccessLevel, @str_UserIPAddress);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement