When using Rules to send sms to a loaded user after updating existing content, it refuses to send sms due to permission problem. But the user has the "receive SMS" permission.

I figured out that this is due to the static $perm array when using user_access function.
If I add the reset argument as true when calling this function as explained below, it works as expected and the sms is sent.

sms_user.module, line 66
if (user_access('receive sms', $account)) { //Check if the user is enabled to receive SMS
to
if (user_access('receive sms', $account, true)) { //Check if the user is enabled to receive SMS

Comments

dpi’s picture

Issue summary: View changes
Status: Active » Closed (outdated)