RegisterCheckUsername

Description

Checks whether or not a username is valid

Syntax

void RegisterCheckUsername ()


Notes

  • Uses the check_username sub-template of the XML template
  • Expects the username to be passed via the query string
  • Cleans up the username and trims it if neccessary
  • Used to indicate whether or not your desired username is valid on the registration form
  • Checks to make sure it isn't reserved, doesn't contain invalid characters and isn't the same as $txt['guest_title']

Context ($context) Variables
Name Description
$context['checked_username'] The username to check. Set from $_GET['username'] (or set to an empty string if $_GET['username'] doesn't exist)
$context['valid_username'] Whether or not the username is valid
Advertisement: