• Resolved pablopixerama

    (@pablopixerama)


    Hello,

    my client has asked me to prevent users from logging in with their email address, being able to do so only through their username.

    For this, I have included the following code in the functions.php:

    remove_filter (‘authenticate’, ‘wp_authenticate_email_password’, 20);

    Only if I deactivate the WP Cerber plugin, I get this code to work, so I understand that there is some configuration in your plugin that must be prevailing.

    Any idea what it could be?

    Thank you very much in advance.

Viewing 1 replies (of 1 total)
  • Plugin Author gioni

    (@gioni)

    Hi! That will not work. Instead, you have to create and use your WordPress filter ‘authenticate’. If a given username is an email address, it has to return a WP_Error object.

Viewing 1 replies (of 1 total)
  • The topic ‘Avoid login with email account’ is closed to new replies.