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.
Comment | File | Size | Author |
---|---|---|---|
#1 | remove_mobile_number-2185179-1.patch | 4.25 KB | almaudoh |
patch.diff | 2.29 KB | JulienF | |
Comments
Comment #1
almaudoh CreditAttribution: almaudoh commentedRe-rolled patch with updates to the rules data types and entity property info. I have tested this manually and it works as expected.
Comment #3
almaudoh CreditAttribution: almaudoh commentedCommitted and pushed to 7.x-1.x. Thanks.
Comment #5
diphir32 CreditAttribution: diphir32 commentedI 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......
Comment #6
almaudoh CreditAttribution: almaudoh commented@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.
Comment #7
almaudoh CreditAttribution: almaudoh commented@diphir32: I have been able to reproduce this bug. Fixed and committed to latest 7.x-1.x-dev version. Thanks.
Comment #8
diphir32 CreditAttribution: diphir32 commentedYes, Thank you very much. solve my problem. many many thanks.