Пример #1
0
echo "IsBranchAdmin: " .  	boolString($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->isBranchAdmin($currentUserID, "")) . "<br>"; 
*/
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// If user did not change it's initial password or has been reset by an admin
if ($GLOBALS["USERMANAGEMENT_DATA_ACCESS"]->isGeneratedPassword($currentUserID) && $GLOBALS["STEAM"]->get_current_steam_user()->get_name() != "root") {
    $usermanagementHTMLTemplate = new koala_html_usermanagement("user-password");
    $content = $usermanagementHTMLTemplate->get_template();
    $content->setVariable("INFO_CHANGE_INITIAL_PASSWORD", "Entweder haben Sie ihr ursprüngliches Passwort noch nicht ge&auml;ndert, oder es wurde von einem Administrator neu gesetzt. Bitte setzen Sie ein neues Passwort, um mit diesem System weiter arbeiten zu k&ouml;nnen.");
    $content->setVariable("TITLE_CHANGE_INITIAL_PASSWORD", "Ursprüngliches Passwort gefunden");
    $content->setVariable("TARGET_URL", "/usermanagement/");
    $content->setVariable("VALUE_INITIAL_PASSWORD_CHANGING", "1");
} else {
    switch ($request->getParameter("template")) {
        case "setup":
            //lms_portal::get_instance()->add_javascript_src("usermanagement", "/styles/standard/javascript/JSON.js");
            if ($viewHelper->rootUserOk()) {
                $content->setVariable("ROOT_ITEM", "item-ok");
            } else {
                $content->setVariable("ROOT_ITEM", "item-fail");
            }
            $content->setVariable("CUSTOMER_OPTION", $viewHelper->getCustomersCombobox());
            $content->setVariable("COURSE_OPTION", $viewHelper->getElearningCoursesCombobox());
            $usermanagementHTMLTemplate->set_context("setup");
            break;
        case "user-password":
            $content->setVariable("CSS_DISABLE_INFOBAR", "style=\"display:none;\"");
            $content->setVariable("TARGET_URL", "/usermanagement/");
            // Redirect to home, if initial password has changed
            if ($request->getParameter("initialPasswordChanging") == "1") {
                $_SESSION["changedInitialPassword"] = "******";
                header("Location: " . PATH_URL . "home/");