Hello,
As an anonymous user I can view the teaser for a members page. As a member I can view the whole page.
But after activating an account, and prior to making the person a member, pages cannot be viewed; it comes up with Error 404.
Does anyone know how to fix this or point me in the right direction?
Any help would be appreciated.
Thanks, Rob
You've given some access to the page for the Anonymous user group and for members, but after activation, the user isn't in either group.
I think the simplest solution is to make the user a member as they register using the &usergroups property in the Register snippet tag. Use the name of your member's group here:
Thanks BobRay for the suggestion.
Membership is dependent on paying a PayPal subscription so I guess I need to add them to an intermediate group until we're able to check payment and manually add them as a member?
Ideally I would like to do this automatically if PayPal is successful but I haven't got there yet in my learning.
Rob
That sounds perfect. Put them in a PreMembers group and give that group the same rights as the anonymous group.
If you can somehow identify the user based on the reply from PayPal (say, by user ID), all you would need to do is this:
$user = $modx->getObject('modUser', $userId);
if ($user) {
$user->joinGroup('Members');
$user->leaveGroup('PreMembers');
}
Thank you BobRay. I'll give this a try.
Your reply is very welcome. Much appreciated, Rob
I'm struggling with this; 6 hours later and still no luck !!
I've created a new group called PreMember and copied the anonymous settings (I hope); that is, in Context Access set 'Super User - 0' Context access for web and 'Member - 9999' Load Only access for web. In Resource Group Access added 'Members Only', minimum role of 'Member - 9999' with access policy of Load Only for web. See images.
Then I added the user to this new PreMember user group (role none) but after flushing permissions this user still gets an error 404.
What am I doing wrong? I'm using MODX Revolution 2.2.13-pl.
Suggestions would be very welcome.
Did you also flush all sessions?
Yes, and cleared the browser cache and tried another browser, and another computer, and I still get Error 404.
I also tried creating a parallel Resource Group but still no luck.
Is there anything else I should try?
Rob
Two thing. Give the user a role in the user group and try "Load, List, and View" for the Policy.
I've experimented with all these different settings - policy and roles - and nothing seems to make a difference even after flushing.
I wonder if the problem could be elsewhere?
The Modx security model isn't immediately understandable although I accept there must be a reason for it.