• Resolved ojaneri

    (@ojaneri)


    Hi!

    First, thanks for the plugin!

    I am adding on my site users using api call (example above). But the users are marked as Active but cant log in directly on my site. I found that they still need to activate the account by accessing their email and clicking on the link.

    But I need them to be already registered and active, without any needs for another confirmation.

    I looked over and over on the configuration, but found nothing.

    Please, help me to make user active without any more confirmation after api call?

    Thank you

    * PHP EXAMPLE I USE TO ADD USER*

    $post_arr = array(
    ‘swpm_api_action’ => ‘create’,
    ‘key’ => ‘APIKEY’,
    ‘first_name’ => $firstname,
    ‘last_name’ => $lastname,
    ’email’ => $email,
    ‘username’ => $email,
    ‘password’ => ‘PASSWORD’,
    ‘membership_level’ => ‘3’,
    );
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL,”https://www.moldescostura.com.br/”);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch,CURLOPT_USERAGENT,’curl’);
    curl_setopt($ch, CURLOPT_POSTFIELDS,
    $post_arr);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec ($ch);

    curl_close ($ch);

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    I found that they still need to activate the account by accessing their email and clicking on the link.

    Are you talking about Free membership registrations? If you are, have you enabled the following feature Email Activation? If you have, disable this feature and it should fix your issue. This field is located in your membership level/s.

    Let me know if the above helps you.

    Thank you

    Thread Starter ojaneri

    (@ojaneri)

    Thanks for your reply.

    Email activation was already off. It didnt help me with this issue.

    Looks like It is hardcoded ??

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi,

    There is an additional parameter send_email, which can be 1 or 0. If it’s 1, addon will send registration email to user upon successful user creation. If not – it won’t. If this parameter is omitted, core plugin setting ‘enable-notification-after-manual-user-add’ will be used to determine if email needs to be sent or not. Also note that sending email may delay API response since there is some time required for WP to send the email.

    The above is mentioned in the following link

    https://simple-membership-plugin.com/simple-membership-api-creating-member-account-using-http-post-request/

    Let me know if the above helps you.

    Regards

    • This reply was modified 5 years, 2 months ago by mbrsolution.
    Thread Starter ojaneri

    (@ojaneri)

    Thank you!

    But I think I didnt made myself clear.

    I am using this

    ‘swpm_api_action’ => ‘create’,
    ‘key’ => ‘apikey’,
    ‘first_name’ => $email,
    ‘last_name’ => $lastname,
    ’email’ => $email,
    ‘username’ => $email,
    ‘password’ => ‘password’,
    ‘membership_level’ => ‘3’,
    “send_email” => 0,

    The plugin works fine for adding user, putting in the correct membership level.

    But I need it to automatically activate the user without any email to the user.

    Is that possible?

    Thread Starter ojaneri

    (@ojaneri)

    Just to let you know, the Actual State of Account is set to Active, but no effects

    Plugin Support mbrsolution

    (@mbrsolution)

    Hi, I have submitted a message to the developers to investigate further this issue.

    Thank you

    Plugin Author wp.insider

    (@wpinsider-1)

    Just to confirm, everything is working fine except that you don’t want an email to be triggered after the member is added?

    I think at the moment in your settings you have the “Send Email to Member When Added via Admin Dashboard” option checked. Which is what is triggering the email since this API one is considered a manual addition. But I will change that because I don’t think that settings should apply for this case. I will make that change in the API addon’s code also.

    Thread Starter ojaneri

    (@ojaneri)

    Just to confirm, everything is working fine except that you don’t want an email to be triggered after the member is added?

    The add goes Fine except that I need the user to be active right away, but he still needs to confirm his email to access the Pages ??

    Plugin Author wp.insider

    (@wpinsider-1)

    If the account status is “active” then the account is active. Nothing else to do. Something else is going messed up ono this site somewhere. What error do you see when the user tries to log in?

    Thread Starter ojaneri

    (@ojaneri)

    On the first screenshot, you see that the API was successfull creating the user id.

    View post on imgur.com

    On the second, on the wp administration, you see the user.

    View post on imgur.com

    and when I click on edit/view, you can see that he/she isnt active yet, still needing to confirm.

    View post on imgur.com

    Hope that its helps for a better understanding.

    Thread Starter ojaneri

    (@ojaneri)

    After a better look, looks like that username parameter is not being created even if the api sends it. That is the cause for the user not being active, even if marked as active.

    I was sending to API

    ‘swpm_api_action’ => ‘create’,
    ‘key’ => ‘PASS’,
    ‘first_name’ => $email,
    ‘last_name’ => $lastname,
    ’email’ => $email,
    ‘username’ => $email,
    ‘password’ => ‘password’,
    ‘membership_level’ => ‘3’,
    “send_email” => 0,

    I just corrected
    ‘username’ => $email,
    to
    ‘user_name’ => $email,

    And it worked. Thank you all for your patience and help! ??

    Plugin Author wp.insider

    (@wpinsider-1)

    Glad to hear you figured it out.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Auto Activate Email – When using API’ is closed to new replies.