improved user edits pages display

This commit is contained in:
2021-07-28 15:58:33 +02:00
parent 422819a11b
commit b67c88dfa7
5 changed files with 41 additions and 10 deletions

View File

@@ -203,6 +203,21 @@ function materiotheme_preprocess_page(&$vars){
// }
/**
* Implements THEME_preprocess_page_title()
*/
function materiotheme_preprocess_page_title(&$variables) {
$current_url = \Drupal\Core\Url::fromRoute('<current>');
$url = $current_url->getInternalPath();
if(preg_match('/^user\/\d+\/*/', $url)) {
$userCurrent = \Drupal::currentUser();
$user = \Drupal\user\Entity\User::load($userCurrent->id());
$email = $user->getEmail();
$variables['title'] = $email;
}
}
/**
* Implements hook_form_alter
*/