This topic is locked
[SOLVED]

 Updating other users records

3/1/2011 6:50:41 AM
PHPRunner General questions
B
btman author

Hi,

I have set up a site where users can keep their excersise scores. When a user is logged initmes like name and email address are autmatically filled in based on the login details.

My issue is, that the admin needs to do add other users records on a regular basis as well. Problem is that in that case the admins login details are used instead of the particular user.
What would be the best way to solve this issue?

Also in the field selection and visual editor screens I have selected the fields that will be shown in various screens like Add and Edit. But I want to make a distiction in fields visible to admin and users. is there a way to do that?
I hope I've made myself clear enough.
Thanks for your reply.
Ben
PS. Apologies for previous post. Had problems uploading and didn't notice it had accepted.

Sergey Kornilov admin 3/1/2011

The easiest way is to create an additional View for the admin that doesn't have "Users can see and edit their own data only" mode turned on. You can restrict access to this view via 'User Group Permissions' and admin can use this view to add data as a user. UserID can be a dropdown box in this case.

B
btman author 3/2/2011



The easiest way is to create an additional View for the admin that doesn't have "Users can see and edit their own data only" mode turned on. You can restrict access to this view via 'User Group Permissions' and admin can use this view to add data as a user. UserID can be a dropdown box in this case.


Hi Sergey,

Basically this works. I am able to add the record. However, when logging in as the user, the added record is not visible. It might have to do with the table setup and query. Is it OK if I make a demo account so you can have a look at it?
Thanks

Ben