How to add a yes/no option for individual users?
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: How to add a yes/no option for individual users?
(06-05-2010 11:51 PM)walkman Wrote:  

PHP Code:
ALTER TABLE `mybb_usergroups` ADD `canviewpage_contact` INT(1) NOT NULL DEFAULT '0'; 


I think you need to add the column in users table.

(06-05-2010 11:51 PM)walkman Wrote:  And the option is added at the users but it won''t save when I check the box.

Maybe something like this:

PHP Code:
1
2
3
4
5
6
function custompages_perms_admin_user_users_edit_commit()
{
	global $mybb, $db, $user;
	
	$db->update_query('users', array('canviewpage_contact' => intval($mybb->input['canviewpage_contact'])), 'uid='.$user['uid']);
}


06-06-2010 07:39 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: How to add a yes/no option for individual users? - RateU - 06-06-2010 07:39 AM

 Standard Tools
Forum Jump: