- Posts: 6
- Thank you received: 0
Assign Usergroup to Membership/Subscription Plan
- Davood Dehnavifar
- Offline
- New Member
Less
More
11 years 11 months ago #23722
by Davood Dehnavifar
Replied by Davood Dehnavifar on topic Re: Assign Usergroup to Membership/Subscription Plan
Hello,
I think I have figured it out... only problem now is the email with the account activation link is not being sent.
We currently only have a free subscription set up for testing to make sure things work how we want.. once we know they work we will be deleting all users that are not admins and starting over with paid subscriptions.
As I said about the email to activate the account is not being sent, the user gets an email on signup but there is no activation link and when the user tries to sign in they get this error:
Login denied! Your account has either been blocked or you have not activated it yet.
Thanks again for your help.
I think I have figured it out... only problem now is the email with the account activation link is not being sent.
We currently only have a free subscription set up for testing to make sure things work how we want.. once we know they work we will be deleting all users that are not admins and starting over with paid subscriptions.
As I said about the email to activate the account is not being sent, the user gets an email on signup but there is no activation link and when the user tries to sign in they get this error:
Login denied! Your account has either been blocked or you have not activated it yet.
Thanks again for your help.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
11 years 11 months ago #23751
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Assign Usergroup to Membership/Subscription Plan
Hi Davood
Go to Membership Pro -> Configuration, find the config option "Send activation email" , set it to Yes and activation email will be sent to subscribers.
Tuan
Go to Membership Pro -> Configuration, find the config option "Send activation email" , set it to Yes and activation email will be sent to subscribers.
Tuan
Please Log in or Create an account to join the conversation.
- Davood Dehnavifar
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
11 years 11 months ago #23764
by Davood Dehnavifar
Replied by Davood Dehnavifar on topic Re: Assign Usergroup to Membership/Subscription Plan
There is no such option on my Membership Pro -> configuration page
Please Log in or Create an account to join the conversation.
- Davood Dehnavifar
- Offline
- New Member
Less
More
- Posts: 6
- Thank you received: 0
11 years 11 months ago #23767
by Davood Dehnavifar
Replied by Davood Dehnavifar on topic Re: Assign Usergroup to Membership/Subscription Plan
I will contact you through the ticketing system to continue receiving help on this.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
11 years 11 months ago #23827
by Tuan Pham Ngoc
If you don't see this config option, you are using old version and the feature is not available. Please download latest version, upgrade to your site in order to use this feature. Also, the latest version (1.5.3) has better support for recurring subscription.
Tuan
Replied by Tuan Pham Ngoc on topic Re: Assign Usergroup to Membership/Subscription Plan
Davood Dehnavifar wrote: I will contact you through the ticketing system to continue receiving help on this.
If you don't see this config option, you are using old version and the feature is not available. Please download latest version, upgrade to your site in order to use this feature. Also, the latest version (1.5.3) has better support for recurring subscription.
Tuan
Please Log in or Create an account to join the conversation.
- please remove account
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
11 years 10 months ago #25618
by please remove account
Replied by please remove account on topic Re: Assign Usergroup to Membership/Subscription Plan
I'd like to pick up this thread again.
For me it's important that users are not only ADDED to a joomla usergroup, they should also be REMOVED from one group while processing a subscription plan. But without losing other groups they're already in. Same vice versa when the subscription expires.
Some examples:
no subscription plan
Users are members in groups SPECIAL and NON-MEMBER
subscription plan EXAMPLE_A
Users should be members in groups SPECIAL and EXAMPLE_A
subscription plan EXAMPLE_B
Users should be members in groups SPECIAL and EXAMPLE_B
subscription expires
Users are members in groups SPECIAL and NON-MEMBER again
With your setting it's only possible they are in NON-MEMBER and EXAMPLE_A (or EXAMPLE_B) the SAME time.
Currently in the backend (inside the subscription plan) I made a setup to add and remove the users to one of the so called EXAMPLE-groups, additionally I've changed some rows inside joomlagroups.php-plugin to remove the group ID 13 when a plan is activated and add it to the users when it expires.
Any other idea that is more clean?! Hope I'm not writing an absolutely mess?! :blink: :silly:
Thanks for your great support!!
For me it's important that users are not only ADDED to a joomla usergroup, they should also be REMOVED from one group while processing a subscription plan. But without losing other groups they're already in. Same vice versa when the subscription expires.
Some examples:
no subscription plan
Users are members in groups SPECIAL and NON-MEMBER
subscription plan EXAMPLE_A
Users should be members in groups SPECIAL and EXAMPLE_A
subscription plan EXAMPLE_B
Users should be members in groups SPECIAL and EXAMPLE_B
subscription expires
Users are members in groups SPECIAL and NON-MEMBER again
With your setting it's only possible they are in NON-MEMBER and EXAMPLE_A (or EXAMPLE_B) the SAME time.
Currently in the backend (inside the subscription plan) I made a setup to add and remove the users to one of the so called EXAMPLE-groups, additionally I've changed some rows inside joomlagroups.php-plugin to remove the group ID 13 when a plan is activated and add it to the users when it expires.
Code:
function onMembershipActive($row) {
if ($row->user_id) {
$user = JFactory::getUser($row->user_id);
$currentGroups = $user->get('groups') ;
$plan = JTable::getInstance('Osmembership','Plan');
$plan->load($row->plan_id);
$params = new JRegistry($plan->params);
$groups = explode(',', $params->get('joomla_group_ids'));
$currentGroups = array_unique(array_merge($currentGroups, $groups)) ;
/* fix to remove group id 13 */
$id = array_search(13, $currentGroups);
unset($currentGroups[$id]);
$currentGroups = array_values($currentGroups);
$user->set('groups', $currentGroups);
$user->save(true);
}
}
Code:
function onMembershipExpire($row) {
if ($row->user_id) {
if (version_compare(JVERSION, '1.6.0', 'ge')) {
$user = & JFactory::getUser($row->user_id);
$currentGroups = $user->get('groups') ;
$plan = &JTable::getInstance('Osmembership','Plan');
$plan->load($row->plan_id);
$params = new JRegistry($plan->params);
$groups = explode(',', $params->get('joomla_expried_group_ids'));
$currentGroups = array_unique(array_diff($currentGroups, $groups)) ;
/* fix to add group id 13 */
$currentGroups[] = 13;
$user->set('groups', $currentGroups);
$user->save(true);
} else {
#Joomla 1.5, implement it later
}
}
}
Any other idea that is more clean?! Hope I'm not writing an absolutely mess?! :blink: :silly:
Thanks for your great support!!
Please Log in or Create an account to join the conversation.
- please remove account
- Offline
- New Member
Less
More
- Posts: 11
- Thank you received: 0
11 years 10 months ago #25621
by please remove account
Replied by please remove account on topic Re: Assign Usergroup to Membership/Subscription Plan
Oups, I saw you solved a part of the problem alread
here
. :blush:
Nonetheless it's important the users still remain in some old groups, so my fix above currently works. If anyone has a better code...let me know.
Nonetheless it's important the users still remain in some old groups, so my fix above currently works. If anyone has a better code...let me know.
Please Log in or Create an account to join the conversation.
- DPaW
- Offline
- New Member
Less
More
- Posts: 14
- Thank you received: 0
11 years 9 months ago #27240
by DPaW
Replied by DPaW on topic Re: Assign Usergroup to Membership/Subscription Plan
I'm having similar issues.
Having imported 250+ subscribers into Membership Pro (all of which are set to active) I find that although I have both User - Joomla! and OS Membership - Joomla Groups plugins enabled, none of the subscribers appears in the Joomla Users list.
Is there a way to ensure that subscribers imported into Membership Pro, also get created in the appropriate Joomla User Group - in or case, Discovery Club Member ?
Cheers, David
Having imported 250+ subscribers into Membership Pro (all of which are set to active) I find that although I have both User - Joomla! and OS Membership - Joomla Groups plugins enabled, none of the subscribers appears in the Joomla Users list.
Is there a way to ensure that subscribers imported into Membership Pro, also get created in the appropriate Joomla User Group - in or case, Discovery Club Member ?
Cheers, David
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
11 years 9 months ago #27318
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Assign Usergroup to Membership/Subscription Plan
Dear David
As I mentioned via support ticket, please send me a sample of CSV file so that I can check it to see what's wrong . If the csv file has the correct format, the users should be created in Joomla without any problem.
Tuan
As I mentioned via support ticket, please send me a sample of CSV file so that I can check it to see what's wrong . If the csv file has the correct format, the users should be created in Joomla without any problem.
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.