UserAuthInterface.php 514 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Drupal\user;
  3. /**
  4. * An interface for validating user authentication credentials.
  5. */
  6. interface UserAuthInterface {
  7. /**
  8. * Validates user authentication credentials.
  9. *
  10. * @param string $username
  11. * The user name to authenticate.
  12. * @param string $password
  13. * A plain-text password, such as trimmed text from form values.
  14. * @return int|bool
  15. * The user's uid on success, or FALSE on failure to authenticate.
  16. */
  17. public function authenticate($username, $password);
  18. }