Quote:
Originally Posted by omardealo
okay i found it , all options user stored on options filed on user table
now , how i can update only option Receive Admin Emails [adminemail] for specific user by php code ?
|
You could execute the query
Code:
UPDATE user SET options = options + 16 WHERE (NOT (options & 16)) AND userid = ID
to set it to Yes, and
Code:
UPDATE user SET options = options - 16 WHERE options & 16 AND userid=ID
to set it to No. Note that you must change ID to the actual userid in each case. I'm assuming you can write php to do those queries.
As Lynne says, this can be done from the admincp without writing php, but since you said in the first post that you want moderators to be able to do it without giving them permission to change any other settings, I'm guessing that you've decided to write your own code to allow them to do it.