本文整理汇总了PHP中PFUser::clearGroupData方法的典型用法代码示例。如果您正苦于以下问题:PHP PFUser::clearGroupData方法的具体用法?PHP PFUser::clearGroupData怎么用?PHP PFUser::clearGroupData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PFUser
的用法示例。
在下文中一共展示了PFUser::clearGroupData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setProjectAdmin
private function setProjectAdmin($group_id, PFUser $user)
{
$result = db_query("INSERT INTO user_group (user_id,group_id,admin_flags,bug_flags,forum_flags,project_flags,patch_flags,support_flags,doc_flags,file_flags,wiki_flags,svn_flags,news_flags) VALUES (" . $user->getId() . "," . $group_id . "," . "'A'," . "2," . "2," . "2," . "2," . "2," . "2," . "2," . "2," . "2," . "2)");
// news_flags
if (!$result) {
exit_error($GLOBALS['Language']->getText('global', 'error'), $GLOBALS['Language']->getText('register_confirmation', 'set_owner_fail', array($GLOBALS['sys_email_admin'], db_error())));
}
// clear the user data to take into account this new group.
$user->clearGroupData();
}