Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Laszlo

    (@laszloszalvak)

    Hi @ridhosay

    I am sorry, but that is not possible.

    You shouldn’t think of social login as if it was a traditional login/register form. Social login works rather that way that it:

    Automatically logs the user in if :

    • there is a WordPress account that is already linked to the social media account
    • or there is no linked WordPress account, but there is an existing WordPress account with the same email address as the social media email address

    Registers the user if both:

    • the registration on your site is enabled ( by default it is based on the WordPress’ membership state that you can find at WordPress > Settings > Membership – Anyone can register or if you have our own “Membership” setting in our General tab set to “Enabled” )
    • and none of the login conditions – described above – are met

    But if you really want to disable the registration on the login pages, and disable the login on the register pages then you will need to do some custom coding <span style=”text-decoration: underline;”>that we can not provide support for</span>. But if you have the necessary coding knowledge and you are interested, then let me know and I will give you some tips that might help you in achieving your goals.

    Best regards,
    Laszlo.

    Thread Starter ridhosay

    (@ridhosay)

    Thank you @laszloszalvak , I use elementor and embed the nextend social button with shortcode.

    is it possible to edit the shortcode, so user can’t register on my login page

    or

    by adding some javascript code above it ?

    Plugin Support Laszlo

    (@laszloszalvak)

    @ridhosay

    A simple JavaScript code is not enough for this, as it turns out on the server side if we need to do registration or login, and only after the user has already authenticated with the social media account and authorized your app – as you don’t know anything about the user until that point.

    Since you told you are publishing the social buttons via shortcode, what could probably work for you is using the tracker data shortcode parameter:

    with different values for your login and register forms. This way on server side you could tell if the buttons are connected to your login or register forms.

    Based on the tracker data, you could hook functions that either turns of the option to login or register over these filters:

    • nsl_{{provider-id}}_is_login_allowed
    • nsl_is_register_allowed

    Normally this will give the user simple warning that the registration / login is disabled. If you want to make the message more specific, you can also hook other functions to these filters:

    • nsl_disabled_login_error_message
    • nsl_disabled_register_error_message

    or if you would like to, you can even override the redirect url where we should redirect when such disabled login/registration would happen:

    • nsl_disabled_login_redirect_url
    • nsl_disabled_register_redirect_url

    Please note that, like I mentioned above, we can not provide support for custom coding, but in our developer documentation you can learn more about the parameters of the filters and you can also find some example for the usage of particular filters:

    Best regards,
    Laszlo.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Different button for Login & Register’ is closed to new replies.