Integration with the Ultimate Membership Pro
Quote from komalbajaj on February 12, 2018, 11:22 amHello, there I want to integrate it with the Ultimate Membership Pro and I know how the workflow will be used to make ut work.
Like
- Use action to add a user to the user group of Asgaros after successful subscription.
- User Asgaros filter/action of check that a user is having access to it or not. But it will require me to add Ultimate membership configuration checkboxes to each forum. And setting there to make it work.
- Maybe some other way but i don’t know 🙂
I think the first one is simplest of them like checking the level of the membership and adding the user to the corresponding user group after successful subscription
Hello, there I want to integrate it with the Ultimate Membership Pro and I know how the workflow will be used to make ut work.
Like
- Use action to add a user to the user group of Asgaros after successful subscription.
- User Asgaros filter/action of check that a user is having access to it or not. But it will require me to add Ultimate membership configuration checkboxes to each forum. And setting there to make it work.
- Maybe some other way but i don’t know 🙂
I think the first one is simplest of them like checking the level of the membership and adding the user to the corresponding user group after successful subscription
Quote from komalbajaj on February 12, 2018, 7:30 pmPlease help
Thanks in Advance
Please help
Thanks in Advance
Quote from Asgaros on February 12, 2018, 9:32 pmYou can find some integration-examples in this forum:
https://asgaros.com/support/?view=forum&id=5
Maybe other users can help you out with the other stuff. I never used Ultimate Membership Pro so I cant give you support for it. 🙂
You can find some integration-examples in this forum:
https://asgaros.com/support/?view=forum&id=5
Maybe other users can help you out with the other stuff. I never used Ultimate Membership Pro so I cant give you support for it. 🙂
Quote from komalbajaj on February 13, 2018, 7:34 amSorry, But there is nothing related to what I need. Can you tell me action/hook which can be used to prevent the each Forum listed to be first checked before getting listed.
Thanks
Sorry, But there is nothing related to what I need. Can you tell me action/hook which can be used to prevent the each Forum listed to be first checked before getting listed.
Thanks
Quote from Asgaros on February 13, 2018, 12:15 pmFor forums there is no such filter available because all access-settings are defined for categories. You can use the asgarosforum_filter_get_categories-filter to implement your custom filter-rules for your categories.
For forums there is no such filter available because all access-settings are defined for categories. You can use the asgarosforum_filter_get_categories-filter to implement your custom filter-rules for your categories.
Quote from komalbajaj on February 14, 2018, 8:29 pmI using the User Groups for integration like
<?php /* Plugin Name: Ultimate Membershipship Pro Integration with Asgaros Forum Plugin URI: https://www.google.com Description: Custom Plugin to Add user according to its Level into its corrosponding User Groups of the Asgaros Forum Version: 1.0 Author: someauthor Author URI: https://www.google.com */ function return_val($lid){ //declare variable to store conditional groupid $var_groupid = 1171; //free if( $lid == 6 ){ $var_groupid = 1171; } //basic elseif( $lid == 2 ){ $var_groupid = 1172; } //standard elseif( $lid == 3 ){ $var_groupid = 1174; } //premium elseif( $lid == 4 ){ $var_groupid = 1175; } //mastermind elseif( $lid == 5 ){ $var_groupid = 1176; } return $var_groupid; } function add_user_to_asgaros_user_group( $user_id , $lid ){ //check eligibility of current user //set the usergroupid variable //run the fun //set the group id using lid AsgarosForumUserGroups::insertUserGroupsOfUsers( $user_id , return_val( $lid ) ); } add_action( "ihc_new_subscription_action" , "add_user_to_asgaros_user_group" ); //ihc_action_after_subscription_activated function remove_user_from_asgaros_user_group( $user_id , $lid ){ AsgarosForumUserGroups::deleteUserGroupsOfUser( $user_id ); } add_action( "ihc_action_after_subscription_delete" , "remove_user_from_asgaros_user_group" ); add_action( "ihc_action_after_cancel_subscription" , "remove_user_from_asgaros_user_group"); add_action( "ihc_action_level_has_expired" , "remove_user_from_asgaros_user_group"); function remove_user_from_asgaros_user_group_afterdelete( $user_id ){ AsgarosForumUserGroups::deleteUserGroupsOfUser( $user_id ); } add_action( "ihc_delete_user_action" , "remove_user_from_asgaros_user_group_afterdelete"); //ump_paypal_user_do_refund this hook is not having too much information so this case has to be dealt manuallyI have created this code but its not working, but when i set the groupid manually then it works. But it’s not working with function which is used to set the groupid according the $lid
AsgarosForumUserGroups::insertUserGroupsOfUsers( $user_id , return_val( $lid ) );This is the action with which I am hooking the code
do_action('ihc_action_after_subscription_activated', $this->user_id, $lid);
I using the User Groups for integration like
<?php /* Plugin Name: Ultimate Membershipship Pro Integration with Asgaros Forum Plugin URI: https://www.google.com Description: Custom Plugin to Add user according to its Level into its corrosponding User Groups of the Asgaros Forum Version: 1.0 Author: someauthor Author URI: https://www.google.com */ function return_val($lid){ //declare variable to store conditional groupid $var_groupid = 1171; //free if( $lid == 6 ){ $var_groupid = 1171; } //basic elseif( $lid == 2 ){ $var_groupid = 1172; } //standard elseif( $lid == 3 ){ $var_groupid = 1174; } //premium elseif( $lid == 4 ){ $var_groupid = 1175; } //mastermind elseif( $lid == 5 ){ $var_groupid = 1176; } return $var_groupid; } function add_user_to_asgaros_user_group( $user_id , $lid ){ //check eligibility of current user //set the usergroupid variable //run the fun //set the group id using lid AsgarosForumUserGroups::insertUserGroupsOfUsers( $user_id , return_val( $lid ) ); } add_action( "ihc_new_subscription_action" , "add_user_to_asgaros_user_group" ); //ihc_action_after_subscription_activated function remove_user_from_asgaros_user_group( $user_id , $lid ){ AsgarosForumUserGroups::deleteUserGroupsOfUser( $user_id ); } add_action( "ihc_action_after_subscription_delete" , "remove_user_from_asgaros_user_group" ); add_action( "ihc_action_after_cancel_subscription" , "remove_user_from_asgaros_user_group"); add_action( "ihc_action_level_has_expired" , "remove_user_from_asgaros_user_group"); function remove_user_from_asgaros_user_group_afterdelete( $user_id ){ AsgarosForumUserGroups::deleteUserGroupsOfUser( $user_id ); } add_action( "ihc_delete_user_action" , "remove_user_from_asgaros_user_group_afterdelete"); //ump_paypal_user_do_refund this hook is not having too much information so this case has to be dealt manually
I have created this code but its not working, but when i set the groupid manually then it works. But it’s not working with function which is used to set the groupid according the $lid
AsgarosForumUserGroups::insertUserGroupsOfUsers( $user_id , return_val( $lid ) );
This is the action with which I am hooking the code
do_action('ihc_action_after_subscription_activated', $this->user_id, $lid);
Quote from Asgaros on February 17, 2018, 9:59 pmThe second parameter of that function expects an array, because a user can be added to multiple groups. So you can try something like:
AsgarosForumUserGroups::insertUserGroupsOfUsers($user_id , array(13, 37));
The second parameter of that function expects an array, because a user can be added to multiple groups. So you can try something like:
AsgarosForumUserGroups::insertUserGroupsOfUsers($user_id , array(13, 37));
Quote from komalbajaj on February 20, 2018, 9:24 amSorry, But its not working. Can you please help me in debugging?
I am attaching the plugin for your reference.
https://drive.google.com/open?id=1oibc0XI7u7SIVyXHMPQc7I9Pr_O9NLJl
Thanks
Sorry, But its not working. Can you please help me in debugging?
I am attaching the plugin for your reference.
https://drive.google.com/open?id=1oibc0XI7u7SIVyXHMPQc7I9Pr_O9NLJl
Thanks