0
votes

I was wondering if anyone knew a good plugin or way of setting up a login system for web users that would take them to private pages of my site (as opposed to the admin section).

On login, the landing page would be different for each user. Would anyone know if this is possible with ModX? Or would it be better to write a custom PHP snippet?

Thanks

1

1 Answers

3
votes

You would use the login extra for modx - that will do 90% of what you are trying to accomplish. As for redirecting the user to a different page or displaying different content after login based on the users group membership, you have a couple of options.

  1. write a snippet to place in the resource specified by the loginResourceId parameter that can detect a user's group and redirect them accordingly or just displays different content.

  2. write a plugin that fires on the onWebLogin event [check that one - I'm pretty sure that's the name but not 100%] which does just basically the same thing as option 1, detect a user's group and redirect accordingly.

both will work, option 2 is cooler :)