Guest User

Untitled

a guest
Jan 4th, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. /**
  2.  * Preprocess variables for page.tpl.php
  3.  */
  4. function modulename_preprocess_page(&$vars) {
  5.  
  6.   // Customizations for all User/profile paths.
  7.   if (arg(0) == 'user') {
  8.     // Do something
  9.   }
  10.  
  11.   // Customize Login page.
  12.   if (arg(0) == 'user' && (arg(1) == 'login' || !arg(1))) {
  13.     $vars['title'] = 'Log in';
  14.   }
  15.  
  16.   // Customize Register page.
  17.   if (arg(0) == 'user' && arg(1) == 'register') {
  18.     $vars['title'] = 'Create a new account';
  19.   }
  20.  
  21.   // Customize Request Password page.
  22.   if (arg(0) == 'user' && arg(1) == 'password') {
  23.     $vars['title'] = 'Forgot your password?';
  24.   }
  25.  
  26. } // End preprocess_page.
Add Comment
Please, Sign In to add comment