Users do not get assigned to the group

  • Posts: 70
  • Thank you received: 4
11 years 6 months ago #72220

HI,

i am having an issue with users not being assigned to the dedicated group.
I have it set at the product page ( 1 product in the entire shop only).
Akeeba Subscriptions plugin is installed as well, and users get the subscription level with the purchase.

No idea why that is not working, but it means that i have to keep checking manually all the time if there are new users that need to be assigned to that particular group. The site is live and is being intensely advertised, so it is quite urgent to have that fixed.

URL www.clarevalleyweddings.com.au

Back end details can be provided if required.

Thanks in advance.

Gidge

Please Log in or Create an account to join the conversation.

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
11 years 6 months ago #72466

Hi,

If you're using Akeeba Subscriptions, I suppose that it is to add/remove the users from a group based on the subscription period.
In that case, you should not use the option "user group after purchase", which is not linked with akeeba subscriptions, but rather use the user group integration of akeeba subscriptions:
www.akeebabackup.com/documentation/akeeb...egration-joomla.html

Please Log in or Create an account to join the conversation.

  • Posts: 70
  • Thank you received: 4
11 years 6 months ago #72680

Hi Nicolas,

Not sure what I am doing wrong, but i just cannot figure out what the problem is. I have configured all the bits and pieces i had to, but it is still not working. For the time being i will use "assign to the group" on the product page while i can, because the product is free for another week. But i really have to resolve this issue.

I will send through PM login details for the site, alongside with what I am trying to achieve, just in case you are able to have a quick look and see what I am doing wrong. Sorry it is a bold move, but i am running out of time to have this sorted and have a major advertising campaign coming out on Wednesday to promote this site so really need it working by then.

Thanks a million!


Just did a little bit of extra testing, and it seems like users also don't get some privileges if they just use activation link they get through registration at the checkout. Some privileges work ans some don't. Once they log out and log back in, it all works fine.
Ahhh.... all becoming quite confusing.

Last edit: 11 years 6 months ago by gidgie.

Please Log in or Create an account to join the conversation.

  • Posts: 81563
  • Thank you received: 13071
  • MODERATOR
11 years 5 months ago #73055

Hi,

The problem is probably that the user privileges are stored in the user session. And when the user group is added to a user, the user session is not updated, thus they don't get the privileges until they logout/login and that their user session is reset with the data from the database.

The issue is that usually the order is confirmed via a payment notification sent by a payment gateway. At that point the user group is added to the user. But it's added by an anonymous user (the payment gateway). So it can't reset the session of another user.

One solution would be to add such code:
$user = JFactory::getUser();
$session = JFactory::getSession();
$session->set('user', new JUser($user->id));

just before the line:
// Instantiate the application.
$app = JFactory::getApplication('site');

in the index.php file of your website. That will force the reload of the user data on each page and avoid that caching issue.

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum