[wp-trac] [WordPress Trac] #58901: Flush 'user_activation_key' after successfully login

WordPress Trac noreply at wordpress.org
Mon Jan 22 05:54:39 UTC 2024


#58901: Flush 'user_activation_key' after successfully login
-------------------------------------------------+-------------------------
 Reporter:  nsinelnikov                          |       Owner:
                                                 |  rajinsharwar
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.5
Component:  Login and Registration               |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing                                        |
-------------------------------------------------+-------------------------

Comment (by rajinsharwar):

 So, here, I am just flushing the activation_key using the $wpdb update,
 just the way we are doing in case of a successful password reset. Also, I
 don't think we need to clear any sort of user cache, because, we are just
 logging the user in using the old password, and removing the activation
 key, we are not changing anything in the User Data.

 Also, I added an initial check if **$user->user_activation_key** is empty
 or not, and then ran that update statement, to avoid unnecessary running
 of query in the case where activation_key will be already empty (In most
 cases)

 Feel free to share any suggestions and any test reports! Let's get this
 committed before the Beta 1!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58901#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list