Example #1
0
    $_perm->_owner = "user";
    $object = $_perm->loadRefDBObject();
    $permsObject[$object->_class][$object->_id]["user"] = $_perm;
}
// Chargement des utilisateurs du profil courant ou de celui de l'utilisateur
$profileUser = new CUser();
$profilesList = array();
if ($user->profile_id) {
    $profileUser->profile_id = $user->profile_id;
    $profilesList = $profileUser->loadMatchingList('user_last_name');
}
if ($user->template) {
    $profileUser->profile_id = $user->_id;
    $profilesList = $profileUser->loadMatchingList('user_last_name');
}
$classes = CApp::getInstalledClasses();
$module_classes = CApp::groupClassesByModule($classes);
// Création du template
$smarty = new CSmartyDP();
$smarty->assign("user", $user);
$smarty->assign("modulesInstalled", $modulesInstalled);
$smarty->assign("isAdminPermSet", $isAdminPermSet);
$smarty->assign("classes", $classes);
$smarty->assign("module_classes", $module_classes);
$smarty->assign("permsModule", $permsModule);
$smarty->assign("permsObject", $permsObject);
$smarty->assign("permModule", $permModule);
$smarty->assign("permObject", $permObject);
$smarty->assign("profile", $profile);
$smarty->assign("profilesList", $profilesList);
$smarty->display("edit_perms.tpl");