benhuson / expire-users

Set expiry dates for users in WordPress
http://wordpress.org/plugins/expire-users/
24 stars 16 forks source link

Fix issue #62 #67

Closed loreboldo closed 4 years ago

loreboldo commented 4 years ago

This small change should fix #62

benhuson commented 4 years ago

Thank you.

Should wp_clear_auth_cookie(); also be called after the new code to logout the logged in user?

loreboldo commented 4 years ago

Well, considering that this code should be executed when you want the users to still be able to log in, I don't see a reason why they should be logged out after removing the expiration date. The potential role change applies also without the need of logout-login. What do you think?

benhuson commented 4 years ago

I wasn't 100% sure than changing a user's role changed their permissions immediately if they were already logged in but not does, so yes, no need to clear cookie ;)

All good - I will merge this