Ejemplo n.º 1
0
 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='******'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');
 }
 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='******'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>';
     }
 }