If you are removing a confirmed mobile phone number and use the associated event sms_user_removed to perform further actions at that moment then the mobile phone never gets removed.

This is caused by the following:

1. In the sms_user.module for the reset form submit it is not needed to load the user before deleting the mobile number in the database as this provide the user With the mobile phone number attached when invoking the rule

2. In the sms_user.rules.inc the event is not declared correctly as arguments is not a valid element in the array

I've attached a patch solving the issue I wanted to solve on my project but I'm sure other enhancements can be made on the rules integration part.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

almaudoh’s picture

Status: Active » Needs review
FileSize
4.25 KB

Re-rolled patch with updates to the rules data types and entity property info. I have tested this manually and it works as expected.

  • almaudoh committed 3d0b535 on 7.x-1.x
    Issue #2185179 by almaudoh, JulienF: Fixed Remove Mobile Number Rule...
almaudoh’s picture

Status: Needs review » Fixed

Committed and pushed to 7.x-1.x. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

diphir32’s picture

I try to apply rules (SMS Framework) "when user remove phone no. then user role automatic change"....

I apply below rules....
Events:
User removed mobile phone number

Conditions:
None

Actions:
Remove user role
Parameter: User: [user], Roles: verified user

I facing the problem when click "Delete & Start over" button then change user roles but confirm mobile phone number never gets removed.
I try this patch "remove_mobile_number-2185179-1.patch" but problem same......help me please......

almaudoh’s picture

@diphir32: try the latest 7.x-1.x-dev version. You don't need to apply any patch as that branch is already up to date. If you still have problems, raise a new issue describing the problem.

almaudoh’s picture

@diphir32: I have been able to reproduce this bug. Fixed and committed to latest 7.x-1.x-dev version. Thanks.

diphir32’s picture

Yes, Thank you very much. solve my problem. many many thanks.