Commit a3b15c9e authored by alexpott's avatar alexpott

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()

(cherry picked from commit 63cad2c6)
parent add4f52d
......@@ -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.
......
Markdown is supported
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