When a user tried to edit his own profile he gets this mesage:

Entered Mobile number is already exists. Please enter different value.

The form validation function asasdasd works for both edit and register forms as below:

if ($form_id == 'user_form' || $form_id == 'user_register_form') {
  $form['#validate'][] = 'simple_mobile_login_user_register_validate';
}

The fix:
simple_mobile_login_user_register_validate function should return true if the user is editing his own profile and the mobile number in the form is the same one for the logged in user.

Comments

mqanneh created an issue. See original summary.

mqanneh’s picture

Issue summary: View changes
mqanneh’s picture

Assigned: mqanneh » Unassigned
Status: Active » Needs review
StatusFileSize
new2.85 KB

Separated register form and user edit form validation handlers.
Added new patch.

jeetendrakumar’s picture

Status: Needs review » Reviewed & tested by the community
jeetendrakumar’s picture

Status: Reviewed & tested by the community » Fixed
mqanneh’s picture

Thank you @jeetendrakumar, I can see that the code still not updated on the dev branch, may you please commit the patch.

jeetendrakumar’s picture

Hi mqanneh,

I had committed the patch.

mqanneh’s picture

Thanks, I think there is an issue with drupal UI since it's still saying that last commit was 7 months ago.
Anyways .. as mentioned earlier I'll be grateful if I can co-maintain this module.
Appreciated.

mqanneh’s picture

Status: Fixed » Closed (fixed)