Function __global->get_author_id_from_name

Definitions

sources/authors.php

  • Get a member ID from an author name. First by trying authors table, second by trying forum usernames.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$author ID_TEXT No No required parameter N/A N/A The name of an author

Returns

  • The member ID (null: none found)
  • Type: ?MEMBER
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get a member ID from an author name. First by trying authors table, second by trying forum usernames.
 *
 * @param  ID_TEXT $author The name of an author
 * @return ?MEMBER The member ID (null: none found)
 */

function get_author_id_from_name(string $author) : ?int