function initializeGui(&$dbHandler, &$argsObj) { $guiObj = new stdClass(); $guiObj->highlight = initialize_tabsmenu(); $guiObj->highlight->view_roles = 1; $guiObj->roles = tlRole::getAll($dbHandler, null, null, null, tlRole::TLOBJ_O_GET_DETAIL_MINIMUM); $guiObj->grants = $argsObj->currentUser->getGrantsForUserMgmt($dbHandler); $guiObj->id = $argsObj->roleid; $guiObj->role_id_replacement = config_get('role_replace_for_deleted_roles'); $guiObj->affectedUsers = null; $guiObj->userFeedback = ''; $guiObj->tproject_id = $argsObj->tproject_id; return $guiObj; }
* @link http://www.testlink.org * * @internal revisions * @since 1.9.10 * */ require_once '../../config.inc.php'; require_once 'users.inc.php'; require_once 'email_api.php'; require_once 'Zend/Validate/Hostname.php'; testlinkInitPage($db, false, false, "checkRights"); $templateCfg = templateConfiguration(); $args = init_args(); $gui = initializeGui(); $user = null; $highlight = initialize_tabsmenu(); $actionOperation = array('create' => 'doCreate', 'edit' => 'doUpdate', 'doCreate' => 'doCreate', 'doUpdate' => 'doUpdate', 'resetPassword' => 'doUpdate'); switch ($args->doAction) { case "edit": $highlight->edit_user = 1; // Because we can arrive with login, we need to check if we can get // id from login if (strlen(trim($args->login)) > 0) { $args->user_id = tlUser::doesUserExist($db, $args->login); } if (is_null($args->user_id) || intval($args->user_id) <= 0) { // need to manage some sort of error message $gui->op->status = tl::ERROR; $gui->op->user_feedback = sprintf(lang_get('login_does_not_exist'), $args->login); } else { $user = new tlUser(intval($args->user_id));
function initializeGui(&$dbHandler, $argsObj) { $gui = new stdClass(); $gui->highlight = initialize_tabsmenu(); $gui->user_feedback = ''; $gui->no_features = ''; $gui->roles_updated = ''; $gui->tproject_name = $argsObj->testprojectName; $gui->featureType = $argsObj->featureType; $gui->optRights = tlRole::getAll($dbHandler, null, null, null, tlRole::TLOBJ_O_GET_DETAIL_MINIMUM); $gui->features = null; $gui->featureID = null; $gui->role_colour = null; $guiCfg = config_get('gui'); if ($guiCfg->usersAssignGlobalRoleColoring == ENABLED) { $gui->role_colour = tlRole::getRoleColourCfg($dbHandler); } return $gui; }
function initialize_gui(&$argsObj, $editorType) { $gui = new stdClass(); $gui->checkboxStatus = null; $gui->userFeedback = null; $gui->affectedUsers = null; $gui->highlight = initialize_tabsmenu(); $gui->editorType = $editorType; $gui->roleCanBeEdited = $argsObj->roleid != TL_ROLES_ADMIN; return $gui; }
function initializeGui(&$dbHandler, &$argsObj, $orderBy) { $guiObj = new stdClass(); $guiObj->highlight = initialize_tabsmenu(); $guiObj->highlight->view_users = 1; $guiObj->update_title_bar = 0; $guiObj->reload = 0; $guiObj->user_order_by = $argsObj->user_order_by; $guiObj->order_by_role_dir = $argsObj->order_by_dir['order_by_role_dir']; $guiObj->order_by_login_dir = $argsObj->order_by_dir['order_by_login_dir']; $guiObj->checked_hide_inactive_users = $argsObj->checked_hide_inactive_users; $guiObj->base_href = $argsObj->basehref; $guiObj->body_onload = $argsObj->body_onload; $guiObj->role_colour = tlRole::getRoleColourCfg($dbHandler); $guiObj->users = tlUser::getAllUsersRoles($dbHandler, get_order_by_clause($orderBy)); $guiObj->grants = $argsObj->currentUser->getGrantsForUserMgmt($dbHandler, $argsObj->tproject_id); $guiObj->tproject_id = $argsObj->tproject_id; return $guiObj; }
function initialize_gui($editorType) { $gui = new stdClass(); $gui->checkboxStatus = null; $gui->userFeedback = null; $gui->affectedUsers = null; $gui->highlight = initialize_tabsmenu(); $gui->editorType = $editorType; return $gui; }