Commit 63cad2c6 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2572821 by AbhishekLal, xxronis, Adita, ritzz, dimaro, hardik.p,...

Issue #2572821 by AbhishekLal, xxronis, Adita, ritzz, dimaro, hardik.p, amit.drupal, gianani, quietone, subhojit777, alexpott: Fix documentation on hook_user_format_name_alter()
parent 92c61141
......@@ -109,13 +109,16 @@ function hook_user_cancel_methods_alter(&$methods) {
* that is displayed. Can be used to ensure user privacy in situations where
* $account->getDisplayName() is too revealing.
* @param string $name
* The string that $account->getDisplayName() will return.
* @param $account
* The account object the name belongs to.
* @param string|Drupal\Component\Render\MarkupInterface $name
* The username that is displayed for a user. If a hook implementation changes
* this to an object implementing MarkupInterface it is the responsibility of
* the implementation to ensure the user's name is escaped properly. String
* values will be autoescaped.
* @param \Drupal\Core\Session\AccountInterface $account
* The user object on which the operation is being performed.
* @see \Drupal\Core\Session\AccountInterface::getDisplayName()
* @see sanitization
function hook_user_format_name_alter(&$name, $account) {
// Display the user's uid instead of name.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment