We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

create URI base on who is logged in

Hi guys,

I wanted to create a URI base on user who is logged in, but i dont have any idea on how to do that here is a sample on what i want to do

https://baseuri/username
or 
https://baseuri/email

thnks guys



58.4k

You can used router set url

@Thien thnks 4 ur idea =)

@Thien i have a question do i also have to create a separate controller for this?



58.4k

Hey

For example application Vokuro https://github.com/phalcon/vokuro/blob/master/app/controllers/SessionController.php#L68, When user login you have session user it , then

    return $this->response->redirect($this->session->username);

Also you need to setup view for it