improved user edits pages display
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user