1.20.x user.module | user_preprocess_block(&$variables) |
Implements hook_preprocess_block().
File
- modules/
user/ user.module, line 1204 - 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;
}
}
}