I have one task and I really don't know how to do that. So there is the table with all actions in Yii web application. All authorization's users can create their own link that indicate to particularly action, for example: There is action name's actionGetAllMovies, and user Sarah set her link 'favouriteMovie', Jack set like 'coolMovie',etc... and when they type their link, they redirect to action actionGetAllMovies. How did "teach" YII realized properly reads this links?
Asked
Active
Viewed 35 times
0
-
what is your current link for different users? – Chetan Ameta Dec 08 '15 at 09:39
-
means how do you routing currently? can you show your urlmanager code from config/main.php – Chetan Ameta Dec 08 '15 at 09:41
-
There are no specially things - only standart rules – YuriiChmil Dec 08 '15 at 18:27
1 Answers
0
in parent controller, in BeforeAction you can get:
1) Controller name: Yii::app()->controller->id
2) And action name: Yii::app()->controller->action->id
3) As you normally known user_id: Yii::app()->user->id
We can only make a request to the database is there for user, controller and action redirect.
Or maybe I misunderstood something?

Andrey
- 441
- 2
- 7
-
Yeah, you are right realized. I'll try it.Also I find another solution, write own CurlManager.I guess it would be better. – YuriiChmil Dec 08 '15 at 07:15