PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

user registration - user already registered

  1. twistystraws
    Member

    I have a user registration form working, and am testing usability. If I try to register with an email address that is already registered, I get the appropriate warning message. Is it possible to include in that message a link to the login page?

    Thanks.

    Posted 13 years ago on Tuesday July 5, 2011 | Permalink
  2. I have forwarded this request to our developer who handles the User Registration Add-On. He is currently traveling but will respond when he gets a chance with a solution.

    Posted 13 years ago on Tuesday July 5, 2011 | Permalink
  3. Hi Twistystraws,

    Here is a snippet to get you started:

    http://pastie.org/2168393

    Paste this in your theme's functions.php. If you'd like more information on the gform_user_registration_validation_message filter, you can read about it here:

    http://www.gravityhelp.com/documentation/page/Gform_user_registration_validation_message

    Posted 13 years ago on Tuesday July 5, 2011 | Permalink
  4. twistystraws
    Member

    Fantastic, thanks very much. You guys are the best.

    Posted 13 years ago on Tuesday July 5, 2011 | Permalink
  5. twistystraws
    Member

    Hey David

    I'm not sure if a GF update has caused problems with this, but although I still get the login link in the warning, I get a missing argument warning at the head of the page, which breaks my theme layout;

    Warning: Missing argument 2 for add_login_link() in /wp-content/themes/theme/functions.php on line 19

    Any clues?

    Thanks.

    Posted 13 years ago on Thursday September 1, 2011 | Permalink
  6. Hi Twistystraws,

    I took a look and saw that you had:

    [php]
    add_filter('gform_user_registration_validation_message', 'add_login_link');

    instead of

    [php]
    add_filter('gform_user_registration_validation_message', 'add_login_link', 10, 2);

    The 10 is the priority, defaults to 10. And the 2 is the number of variables you wish to pass to the function. In this case, we want to pass the $validation_message and $form variables, so "2".

    Posted 13 years ago on Thursday September 1, 2011 | Permalink