BuddyDev

Search

[Resolved] Auto join groups – cron job

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #39729

    Hello Darshan,

    The provided credentials have not worked for me. Please check.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 19
    Darshan on #39746

    Hi Ravi,

    Just tried the credentials and it worked for me. Did you click the ‘red’ login button? Blue login button will take you to SSO login and that won’t work.

    Thanks

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #39757

    Hello Darshan,

    Thank you for the clarification. It was the “BuddyPress Auto Join Groups” plugin which is overriding the custom code functionality. For now, I have deactivated “BuddyPress Auto Join Groups” and “BuddyPress Auto Join Groups Sync”. Please give it a shot now.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 19
    Darshan on #39763

    Hi Ravi,

    It does work when saving the profile. However, as we started initially would like to update group subscription/unsubscription via automated cronjobs so if we can find a solution for it that would be great. Groups will be determined by admin and user will not have choice which group to join or not.

    Thanks for your help so far

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2908
    Ravi on #39772

    Hello Darshan,

    Please try after activating both the plugins and remove all the rules created by “Auto Join Groups” and let me know if it helps or not.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 19
    Darshan on #39791

    Hi Ravi,

    If we remove the rules, how will it know which user belongs to which group?

    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #39833

    Hi Darhsan,
    Currently, the profile field acts as the source of groups.

    You have used group id in the profile field and the code shared previously uses that as the only definitive source for the groups.

    also, you no longer need the cron job, in order to automate, all you need to do is update user’s profile field with the new group ids.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 19
    Darshan on #39959

    It works! Will let you know if any further issues.

    Thanks for your help

  • Keymaster
    (BuddyDev Team)
    Posts: 24149
    Brajesh Singh on #39961

    Hi Darshan,
    Thank you for confirming.

    Please feel free to open a new topic if you face any issue in future.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 19
    Darshan on #40038

    Hi Brajesh,

    Does this plugin not work if the group is a hidden group? If so, any way we can make it work?

    Thanks

You must be logged in to reply to this topic.

This topic is: resolved