Navigation

Search

isReservedName

Description

Checks if name is a reserved name or username.

Syntax

bool isReservedName (string $name[, int $current_ID_MEMBER[, bool $is_name[, bool $is_fatal]]])



Parameter $name

Expected type: String
Description: The name to check



Parameter $current_ID_MEMBER

Expected type: Integer
Description: ID of the current member (prevents matching from current user). Defaults to 0 (indicates that user isn't registered yet)



Parameter $is_name

Expected type: Boolean
Description: Whether or not this is a display name. Default is true.



Parameter $is_fatal

Expected type: Boolean
Description: If true, function throws a fatal_lang_error if the name is reserved. Otherwise the function will return true if the name is reserved.



Return value

Expected type: Boolean
Description: Returns false if name isn't reserved. Returns true if name is reserved and is_fatal is false.


Notes

  • If is_name is false, the name is assumed to be a username.
  • The ID_MEMBER variable is used to ignore duplicate matches with the current member.
View all versions of this function