Customer View And Member/admin View

Hi,

I am developing a application which will have customer login to view their details and admin/members login to manage/update the application/user’s data.

I am having one table which consists of user’s data and the same data when login with customer login id he will see only his data.

can it be possible to create seperate login table & login page for customer eg:- (tbl_cust) and another table eg:- (tbl_staff)

customer’s user ids will be stored in tbl_cust & Staffs user ids will be saved in tbl_staff table.

On searching the forum i came to know that for my above requirement i have to do the following.

  1. create 2 table tbl_cust & tbl_staff

tbl_cust will contain the customer data and customer user login

tbl_staff will contain the members/admin login to manage the data.

2)create a front end and back end directories (http://www.yiiframew…ionend-behavior)

front end for customer view & back end for members/admin to manage

  1. create 2 UserIdentity.php file one for front end and other for back end.

front end UserIdentity.php file will check for users in tbl_cust if found it will login and redirect to customer profile page and if not found it will give error. it wont be checking tbl_staff for user’s.

back end UserIdentity.php file will check for users in tbl_staff if found it will login and redirect to members page and if not found it will give error. it wont be checking tbl_cust for user’s.

please correct me i am wrong, so that i can start working on it.

If anyone has already done this then can you please update the code which will be very helpful.

Thanks in advance

I think you are on the right way.

You can use the concept of "module" for admin part(backend) which i like.

Read this link:Module based login and Fundamental of module

Also,

If you want to achieve using a single table for users, then add an extra column to distinguish between staff and admin. And using this very particular column, allow staff to only view and admin to update and manage. You can achieve this easily…

Try it!

Thanks for your suggestion,

Many more suggestions are welcome…

Hi,

I am still in the learning phase of YII so awaiting experts suggestion otherwise if this is the wrong way then all my efforts will go in vein.

Thanks in advance

Hi,

I tried the above but being less friendly to php and YII i am getting it too difficult to do.

Is there any simple way to achive this…

I hope someone must have faced this issue, please help me in this.

Thanks in advance…