Problem/Motivation
When an administrator user tries to add a new user with this module enabled the user is not created and no error message is displayed.
In otp.module the 'otp_form_user_register_form_alter' is created to add a new submit callback to user register form.
Inside this alter two conditions are checked:
the first one (!$form['administer_users']['#value']) is only true for non admin users, so for these users the extra submit handler is NOT added.
the second one is true for all users so '::save' handler is unset
As a result when an admin user try to create a new user profile there is no save handler in submit proccess
Steps to reproduce
Enable this module
As admin, go to add user page /admin/people/create
Fill fields and click 'Create new account button'
User is not created
Proposed resolution
Remove second condition, when an admin is creating a new user we don't need otp verification
I have no time to test this in a clean drupal installation but in our case simply commenting line 27 in otp.module creation users flow works again.
I'll come back with more test and a proper patch (if needed) when I have time to review in depth.
Comments
Comment #3
sadashiv commentedThanks for reporting this issue and sorry for my late reply, have fixed this issue in the latest release at https://www.drupal.org/project/otp/releases/8.x-1.0-beta1
Thanks,
Sadashiv
Comment #4
sadashiv commentedNo reply, assuming this is fixed, feel to reopen if you have issue.
Thanks,
Sadashiv.