Closed (won't fix)
Project:
Role Expire
Version:
6.x-1.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2012 at 15:39 UTC
Updated:
9 Jan 2018 at 19:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
stewsnoozeI definitely have not seen this before. Were you running cron as an authenticated user or through wget/drush ? user_save does different things depending on who is logged in which I hate but it would be interesting to know?
Comment #2
mikebell_ commentedI was running it through drush as anon. I'll test as an authed user and report back.
Comment #3
mikebell_ commentedOk even if I run it as uid 1 it's still being removed.
The role is initially applied using role_expire_write_record() on a node_save if that helps.
From looking through the code this is happening because $role is blank (see line 374). The array_key_exists() check is failing. I have no idea why this would be happening.
Comment #4
mikebell_ commentedI keep going round in circles trying to find an issue with this but can't, the following patch does some minor code formatting changes and comments out the offending call to role_expire_delete_record(). It's most likely wrong and will break things for others but my testing finds no issues in this use case.
Comment #5
mikebell_ commentedNew patch with compat for http://drupal.org/node/1504216
Comment #6
stewsnoozeThis last patch doesn't seem right. It just comments out a call to a function which in essence makes the whole else clause not needed. If this is your intended functionality then the whole else clause should be taken out.
Comment #7
rcodinaDrupal 6 version is unsupported!