• Resolved smfisher

    (@smfisher)


    I have the password and confirm_password fields enabled and wish to be able to allow the user to specify a password when registering but to reject trivial passwords. Using wpmem_register_data I could replace the trivial password by a long random string but I really want to reject it and inform the user.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chad Butler

    (@cbutlerjr)

    You could do that with wpmem_pre_register_data. Validate the field, then apply an error message to the global $wpmem_themsg.

    https://rocketgeek.com/plugins/wp-members/docs/filter-hooks/wpmem_pre_register_data/

    Side note just because I’m getting closer on this: future versions WILL work towards phasing out $wpmem_themsg in favor of a more formal error class (hopefully just using the WP error class). It has put off for a long time because $wpmem_themsg is used by so many installs for customization. Once I develop a strategy, it would be a “phase in” process with the old process being backward compatible. Likely, it will be similar to how the login error is being changed to use the WP error message – you can currently select it as an option to use the old way vs the new.

    Thread Starter smfisher

    (@smfisher)

    Chad,

    Thanks very much. I thought I had read through all the documentation. That is just what I need!

    Steve

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Reject bad password’ is closed to new replies.