Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The hook sms_user_user_validate() does not appear to fire. If I register as a new user with an existing number in the sms_user table in the database, the uid relating to that number/row is changed to that of my new user.
Thanks,
David
Comment | File | Size | Author |
---|---|---|---|
#4 | no_phone_number-1915022-4.patch | 6.14 KB | almaudoh |
#3 | smsframework.sms_user-number_validation.1915022-03.patch | 3.83 KB | ekes |
Comments
Comment #1
smassally CreditAttribution: smassally commentedI think sms_user_user_validate() depends on hook_user_validate which is not in d7 core. You'ld have to implement in a validate function if you hook into the form using hook_form_alter
Comment #2
ekes CreditAttribution: ekes commentedAs mentioned by tarzan08201 sms_user save relies on the removed hook_user_validate() to check that the number is not a duplicate.
This is an issue for when the SMS number is shown on the registration form. Other case: Registration by SMS only happens if the number is not recognized; and Phone tab on user profile do validate the number first.
Comment #3
ekes CreditAttribution: ekes commentedPatch moves validation for both user edit, and user registration to #element_validation.
Comment #4
almaudoh CreditAttribution: almaudoh commentedRe-rolled patch.
Comment #6
almaudoh CreditAttribution: almaudoh commentedCommitted / pushed to 7.x-1.x