Skip to main content
8 events
when toggle format what by license comment
May 8, 2015 at 17:44 comment added user2941726 Also it now no longer deletes user from the database.
May 8, 2015 at 17:11 comment added user2941726 I'll edit my post and add the rest of the code.
May 8, 2015 at 17:04 comment added ambroseya Not in that same location, it will never reach the line. Could you put wp_logout() into the function called by the wp_delete_user hook, followed by the redirect? Sorry, I'm usually more concise with a correct solution but it's not enough of the code to test live.
May 8, 2015 at 16:54 comment added user2941726 It worked... sort of. It's redirecting now, but won't log the user out. I can't add wp_logout after wp_redirect, can I?
May 8, 2015 at 16:28 comment added user2941726 I haven't really thought about that, I'll try it.
May 8, 2015 at 16:25 comment added ambroseya Does the user still get logged out by wp_delete_user if the wp_logout line is removed? Would it make more sense then to use the deleted_user hook?
May 8, 2015 at 16:19 comment added user2941726 The variable is initialized to false right before the function.
May 8, 2015 at 16:13 history answered ambroseya CC BY-SA 3.0