Yii Framework Forum: login page - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

login page login page, pull roles from DB and redirect according to role

#1 User is offline   Akwinsky 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 14-December 11

Posted 03 February 2012 - 05:39 AM

Hello Everyone !

I'm a newbee to Yii but willing to learn it, I got both of published books and went through them but still can't accomplish what I need, can you help me please ?

Site that I'm creating is something like members area in a whole, so nothing of content is displayed before someone log in. After log in, it should be done against MySQL, and pulling user role from DB, it has to redirect to content that specific user can see.

index.php->Login->(success login,user role)->(dir)admin(admin controllers)
(dir)member(member controllers)

I would like to separate role folders and according to role to redirect user to it.
ex: mysite.com/admin/controllerID1/actionIndex

I'll appreciate any help.

Kind Regards,
Robert
0

#2 User is offline   sensorario 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,987
  • Joined: 07-September 10
  • Location:Cesena (Italy)

Posted 03 February 2012 - 10:18 AM

I think you need to create different modules. When you create a module, you also create a folder that contains all controllers, models and views in a specific folder. The structure of a module is the same of an yii application. It permit you to separate logical module of your app by folders.
0

#3 User is offline   rahud487 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 07-July 13
  • Location:Madisonville

Posted 07 July 2013 - 01:28 AM

Thanks sensorario.

You have given helpful information.
0

#4 User is offline   Stefansalvatore 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 14-January 14

Posted 14 January 2014 - 01:14 AM

Thanks sensorario. But what about the naming pattern of different modules.
0

#5 User is offline   sensorario 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,987
  • Joined: 07-September 10
  • Location:Cesena (Italy)

Posted 15 January 2014 - 03:36 AM

VendorNameModuleName
0

#6 User is offline   sensorario 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,987
  • Joined: 07-September 10
  • Location:Cesena (Italy)

Posted 15 January 2014 - 03:37 AM

View PostStefansalvatore, on 14 January 2014 - 01:14 AM, said:

Thanks sensorario. But what about the naming pattern of different modules.


Suppose to create modules for manage comments, resize image, ...:

- StefansalvatoreComment
- StefansalvatoreImageResizer
- ...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users