user_preprocess_block

user_preprocess_block(&$variables)

Implements hook_preprocess_HOOK() for block templates.

File

core/modules/user/user.module, line 401
Enables the user registration and login system.

Code

function user_preprocess_block(&$variables) {
  if ($variables['configuration']['provider'] == 'user') {
    switch ($variables['elements']['#plugin_id']) {
      case 'user_login_block':
        $variables['attributes']['role'] = 'form';
        break;
    }
  }
}
doc_Drupal
2016-10-29 09:53:18
Comments
Leave a Comment

Please login to continue.