Does anyone know how to allow users to edit another user´s email in a Drupal 6 site, when and only when that user did create the second one?
Let me explain with an example:
User A has role 1.
I have a form that programatically creates new users of role 2 each time the user A fills in and press the save button. (ie. user B, C, E, etc)
So user A creates user B.
I want user A to be able to edit user´s B account. But I want to allow that only to the users that user A has created. If I set a permission to edit users account for user A, he will be able to edit all accounts.
If there´s a user C out there that also has role 2, but wasn´t created by user A, I don´t want to allow the edit capability.
User B is not a subuser of any sort, it´s a full, normal user, just with another role. (I know there´s a module that allows you to create some sort of “subusers”, I don´t mean that).
Any ideas on where to start digging about this?
Thanks!!!
Rosamunda
create a new table, where you have two columns
Now, you do have a unique ID for userA, B and so on. keep storing them in this table. and for editing, you can have a check against it.