else { $this->
getRequest()->query->
set('destination',
$this->
getRequest()->request->
get('destination'
));
} user_login_finalize($account);
} /**
* Sets an error if supplied username has been blocked.
*/
public function validateName(array &
$form, FormStateInterface
$form_state) { if (!
$form_state->
isValueEmpty('name'
) &&
user_is_blocked($form_state->
getValue('name'
))) { // Blocked in user administration.
$form_state->
setErrorByName('name',
$this->
t('The username %name has not been activated or is blocked.',
['%name' =>
$form_state->
getValue('name'
)]));
} } /**
* Checks supplied username/password against local users table.
*
* If successful, $form_state->get('uid') is set to the matching user ID.
*/
public function validateAuthentication(array &
$form, FormStateInterface
$form_state) {