Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The OrphanProcessor does not work atm.
Proposed resolution
Lets port it as is to D8 and improve it later.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | 2841620-1.patch | 7.72 KB | webflo |
Comments
Comment #2
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #3
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedI moved the ldap_user_cron_last_uid_checked to the state system. Lets add an update hook to delete the old setting.
Comment #4
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedI think we shouldn't touch all user objects because this could lead to a lot of cache invalidation. The ldap_user_last_checked time it not used for the query and therefore not relevant.
Comment #5
grahlComment #7
grahlThanks for starting to get ball rolling on this webflo!
I've finished porting the orphan processor and the mail functionality seems to work fine now, though I'm not convinced that this actually works properly on 7, since I've had to modify searchAllBaseDN slightly: The puid is often representative of the whole DN, a search across that within the base DN will in most cases likely return 0 results, thus this has to be stripped out. At least for the Docker test configuration this is the case.
There could be real-world configurations where that is not the case. If one of those turns up I'll add it as a new use case to testSearchAllBaseDns() but I'd require some feedback here.
I agree that in the previous configuration saving accounts was not ideal when ldap_user_last_checked was not taken into account. I've now added a field to the configuration which allows one to check daily, monthly, weekly or always thus this should now server an actual purpose. I'm open to suggestions if someone had a better solution.
Moving ldap_user_cron_last_uid_checked to state is a good solution, since we are still in alpha releases and the setting doesn't really hurt I'm not writing an update hook for that. If you think we really need that I'd accept another patch ;-)
I have not merged the first part of your patch modifying userPuidFromLdapEntry() since that's unrelated. Could you please add a separate ticket for that? I'd like to not add that without exactly knowing what side-effects this could have.