XF 2.2 Creating a generic link that will always send a user to their profile

RobinHood

Well-known member
I'm trying to create a link that we can copy and paste, or display as a clickable link that will work outside of the templating system that will redirect a user to their profile.

For example: site.com/profile to redirect the user to site.com/members/username.1

Can this be done with the routing system?

If not, any recommendations on an approach to take to tackle this?
 
Are we talking a vanity profile URL system or just a generic /profile URL that leads to the profile page of the logged in user?

The latter can be achieved with a small custom controller and route, although a custom router would probably also be able to handle some of it. The controller could handle a log-in error better though, probably.
 
Back
Top Bottom