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
1 2 3 4 5 6 7 8 9 | function user_preprocess_block(& $variables ) { if ( $variables [ 'configuration' ][ 'provider' ] == 'user' ) { switch ( $variables [ 'elements' ][ '#plugin_id' ]) { case 'user_login_block' : $variables [ 'attributes' ][ 'role' ] = 'form' ; break ; } } } |
Please login to continue.