[wp-trac] [WordPress Trac] #46349: Is your/this admin email still correct

WordPress Trac noreply at wordpress.org
Tue Jun 4 03:30:48 UTC 2019


#46349: Is your/this admin email still correct
-------------------------------------------------+-------------------------
 Reporter:  andraganescu                         |       Owner:
                                                 |  andraganescu
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.3
Component:  Users                                |     Version:  5.1
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion servehappy has-patch     |     Focuses:  ui,
  dev-feedback needs-testing                     |  administration
-------------------------------------------------+-------------------------

Comment (by azaozz):

 Looking at admin_email_reminder.diff, seems to work pretty well here. Got
 couple of suggestions :)

 Generally PHP constants are not great for things that some users may want
 to change. If we want `ADMIN_EMAIL_MAX_AGE` to be changeable, how about we
 set it with a filter? Perhaps something like:
 {{{
 $admin_email_max_age = apply_filters( 'admin_email_max_age', 180 *
 DAY_IN_SECONDS );
 }}}

 It's used in just one place so this would work well.

 Thinking it's not a good idea to do `delete_option( 'admin_email_lifespan'
 );` at the top of wp-login.php. If the option has been deleted, it will go
 to the DB to try and get it again, and that file may be a subject of brute
 force login attempts :)

 Maybe we can keep the option and set it to some value (this is actually
 the "recommended way" to use options, make sure they exist at all times
 and don't change the value (write to the DB) for non-authenticated users).
 That will also remove the need to delete it.

 The rest is minor/nitpicks :) Generally HTML tags should be avoided in
 translatable strings. Think there was something in the coding standards
 against nested single `if` (but may be mixing that with the JS coding
 standards.

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


More information about the wp-trac mailing list