Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1.  
  2. // RuneScape private server friendly usernames
  3. substr_replace("_", " ", 0);
  4. substr_replace(" ", " ", 0);
  5. substr_replace(" ", " ", 0);
  6. $rsuser = $regOptions['username'];
  7. $rspass = $regOptions['password'];
  8. if(strlen($rsuser) < 3 || strlen($rsuser) > 12) {
  9. die('Usernames must be between 3 and 12 characters in length.');
  10. }
  11. if(strlen($rspass) < 3 || strlen($rspass) > 20) {
  12. die('Passwords must be between 3 and 20 characters in length.');
  13. }
  14. if(!preg_match('/^[\w-]+$/', $rsuser)) {
  15. die('Usernames can only contain characters a-z, 0-9');
  16. }
  17. if(!preg_match('/^[\w-]+$/', $rspass)) {
  18. die('Passwords can only contain characters a-z, 0-9');
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement