- Issue created by @chrislarrycarl
- π³πΏNew Zealand webindustries
We're also seeing this issue when updating the email address associated with a user who has mfa enabled on their account.
When editing the email address for a user the changes are saved but there are two errors presented in addition to the confirmation message (screenshot attached).
Edit the email address for a Drupal admin console user that has 2FA enabled for their account.
The errors are caused by the undeclared user id check variable in the miniorange_2fa_user_presave() function in miniorange_2fa.module on line 329.
$userID != $mo_db_values['mo_auth_firstuser_id']
It's not entirely clear from the comment if the intent is to prevent the first user from changing their email address in the 2FA user management list or if this part of the conditional is extra.
If the intended behavior is to prevent the first user from changing their email address the variable needs to be declared. The current behavior is that email addresses are updated for the first user in this list when changed.
```
$variables_and_values = array(
'mo_auth_firstuser_id',
);
$mo_db_values = MoAuthUtilities::miniOrange_set_get_configurations($variables_and_values, 'GET');
```
If it's extra it can be deleted. With direction either way I'd be happy to submit a merge request, thanks!
Active
5.1
Code
We're also seeing this issue when updating the email address associated with a user who has mfa enabled on their account.