• Is it possible to generate a link to establish a specific league? in this way the link is sent to the users and we do not have to manually associate them to a specific league.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author AntoineH

    (@antoineh)

    There is no out of the box solution for this. But you can extend the code of the registration via a hook if you have any PHP knowledge. A bit more info on this can be found here.

    Thread Starter jmandrille

    (@jmandrille)

    For the case mentioned, I have decided to create forms for the registration of users where I define the league and in this way the user does not see or choose the league, which was the point that interested me and I was able to solve.
    Now when users register I can see in the plugin that the value “footballpool_registeredforleague” is working fine although I can’t get it to activate in the league and it requires admin approval.

    I used the following snippets shared by you in the help section but it only works if they use the native wordpress registration and not with the form that I created.

    <?php
    // don't use admin approval for league registration of new users
    // just put them in the league they chose
    add_filter( 'footballpool_new_user', function( $user_id, $league_id ) {
        Football_Pool::update_user_custom_tables( $user_id, $league_id );
    }, null, 2 );
    ?>

    I tried changing the second parameter ($league_id) to $user_footballpool_registeredforleague, but it doesn’t work for me either… could you help me just assign this parameter and avoid having to manually approve league registrations?

    Thank you very much!

    I’m sorry for jumping in your thread but I see that you mention solving how to define the leagues in the sign up form, so users do not see or choose the league.

    May I ask how you did that? I’m trying the same thing using UM registration plugin, but I can’t seem to get it to work.

    Thread Starter jmandrille

    (@jmandrille)

    What I did was create a form with JetFormBuilder and create the hidden field “footballpool_registeredforleague” by manually entering the id of the league to which I want to associate that user. You can go through their documentation and just add the field, then you can create 1 form page for each league you have and the problem is solved.
    Additionally with the Members and LoginWP plugins create different user profiles for each league and redirects so each user can only see their league without mixing with the rest of users from other leagues.

    https://jetformbuilder.com/features/register-user/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘registration to specific league (link)’ is closed to new replies.