Hi,

I'm able to see the Mobile Tab for a user, and am able to enter a phone number. I receive a text message with the confirmation number, enter it, and all is well.

When I use the functionality to delete and start over, I get a confirmation that it's been removed, but it stays populated and doesn't give the option to change it.

If I clear caches, it gets removed and I'm able to start over.

Thanks, in advance, for any thoughts or assistance you can provide.

Best!
Glenn

Comments

interestingaftermath’s picture

I'm also having this issue.

Clicking "Delete & Start Over" appears to do nothing until the cache is cleared. The user is given no feedback and is unable to proceed until an admin clears the cache. Upon clearing the cache, the form is reset and they are able to enter a new number as expected.

JulienF’s picture

I've had the same issue on a test server (where all caching were enabled)

The reason for that is because the $account object do not get reset and only the database field is being deleted.

To avoid facing this issue I had to edit the sms_user_delete function as follow:

function sms_user_delete($uid, $number = FALSE) {
  if (is_object($uid)) {
      unset($uid->sms_user);
      user_save($uid);
      $uid = $uid->uid;
  }
  
    $query = db_delete('sms_user')
      ->condition('uid', $uid);
    if ($number) {
      $query->condition('number', $number);
    }
    $num_deleted = $query->execute();
}

and also change the way the account is being passed to this function in both the

sms_user_settings_confirm_form_submit
sms_user_settings_reset_form_submit

functions so it looks like this

$account = user_load($form_state['values']['uid']);
  sms_user_delete($account);

I wanted to create a patch but I've previously edited this file to fix another issue so the patch doesn't get produced according to the initial file...

Hope this helps!

almaudoh’s picture

Issue summary: View changes

I have not been able to reproduce this bug. Can you provide details on your setup?

almaudoh’s picture

Status: Active » Closed (cannot reproduce)

Could not reproduce this issue. Other patches may have fixed it. Feel free to re-open or create a new issue if this happens again.