1 user.module user_preprocess_block(&$variables)

Implements hook_preprocess_block().

File

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

Code

function user_preprocess_block(&$variables) {
  if ($variables['block']->module == 'user') {
    switch ($variables['block']->delta) {
      case 'login':
        $variables['attributes']['role'] = 'form';
        break;
      case 'new':
        $variables['attributes']['role'] = 'complementary';
        break;
      case 'online':
        $variables['attributes']['role'] = 'complementary';
        break;
    }
  }
}