本文整理匯總了PHP中UserProfile::enableGodMode方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserProfile::enableGodMode方法的具體用法?PHP UserProfile::enableGodMode怎麽用?PHP UserProfile::enableGodMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserProfile
的用法示例。
在下文中一共展示了UserProfile::enableGodMode方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: userExtraData
function userExtraData($id_user)
{
require_once _base_ . '/lib/lib.user_profile.php';
$lang =& DoceboLanguage::createInstance('profile', 'framework');
$profile = new UserProfile($id_user);
$profile->init('profile', 'framework', 'modname=public_user_admin&op=org_manageuser&id_user=' . $id_user, 'ap');
$profile->enableGodMode();
$profile->disableModViewerPolicy();
return $profile->_up_viewer->getUserInfo() . $profile->getUserTeacherProfile() . $profile->getUserLmsStat();
}
示例2: die
\ ======================================================================== */
/**
* @package course management
* @subpackage course catalogue
* @category ajax server
* @author Giovanni Derks
* @version $Id:$
*
*/
if (Docebo::user()->isAnonymous()) {
die('You can\'t access');
}
require_once $GLOBALS['where_framework'] . '/lib/lib.permission.php';
$op = Get::req('op', DOTY_ALPHANUM, '');
switch ($op) {
case "getuserprofile":
$lang =& DoceboLanguage::createInstance('standard', 'framework');
$lang->setGlobal();
require_once _base_ . '/lib/lib.user_profile.php';
$id_user = importVar('id_user', true, 0);
$profile = new UserProfile($id_user);
$profile->init('profile', 'framework', 'modname=directory&op=org_manageuser&id_user=' . $id_user, 'ap');
$profile->enableGodMode();
$profile->disableModViewerPolicy();
$value = array("content" => $profile->getUserInfo(), "id_user" => $id_user);
require_once _base_ . '/lib/lib.json.php';
$json = new Services_JSON();
$output = $json->encode($value);
aout($output);
break;
}
示例3: checkPerm
function org_manageuser()
{
checkPerm('view_org_chart', false, 'directory', 'framework');
require_once _base_ . '/lib/lib.user_profile.php';
$lang =& DoceboLanguage::createInstance('profile', 'framework');
$profile = new UserProfile(importVar('id_user', true, 0));
$profile->init('profile', 'framework', 'modname=directory&op=org_manageuser&id_user=' . importVar('id_user', true, 0), 'ap');
$profile->enableGodMode();
$profile->setEndUrl('index.php?modname=directory&op=org_chart#user_row_' . importVar('id_user', true, 0));
$GLOBALS['page']->add($profile->getHead() . getBackUi('index.php?modname=directory&op=org_chart', $lang->def('_BACK')) . $profile->performAction() . $profile->getFooter(), 'content');
}
示例4: editprofile
public function editprofile()
{
//check permissions
if (!$this->permissions['mod_user']) {
$output = array('success' => false, 'message' => $this->_getErrorMessage('no permission'));
echo $this->json->encode($output);
return;
}
require_once _base_ . '/lib/lib.user_profile.php';
$id_user = Get::req('id_user', DOTY_INT, -1);
if ($id_user > 0) {
$profile = new UserProfile($id_user);
$profile->init('profile', 'framework', 'r=' . $this->link . '/editprofile&id_user=' . (int) $id_user, 'ap');
if (Docebo::user()->getUserLevelId() == ADMIN_GROUP_GODADMIN) {
$profile->enableGodMode();
}
echo '<br />' . '<div class="std_block">' . getBackUi('index.php?r=' . $this->link . '/show', Lang::t('_BACK', 'standard')) . $profile->performAction() . '</div>';
}
}