Earlier we use the below code for creating custom template of user login ,user profile edit and forget password forms:
function Yourtheme_theme($existing, $type, $theme, $path){
return array(
'user_register' => array(
'render element' => 'form',
'template' => 'templates/user-register',
),
'user_pass' => array(
'render element' => 'form',
'template' => 'templates/user-pass',
),
'user_profile_form' => array(
// Forms always take the form argument.
'arguments' => array('form' => NULL),
'render element' => 'form',
'template' => 'templates/user-profile-edit',
),
);
}
function Yourtheme_preprocess_user_register(&$variables) {
$variables['rendered'] = drupal_render_children($variables['form']);
}
function Yourtheme_preprocess_user_login(&$variables) {
$variables['rendered'] = drupal_render_children($variables['form']);
}
How to Create same twig template files in drupal 8 for customizing user login,user profile edit and forget password forms?