/**
  * Init password form.
  *
  * @param        int        $a_mode        Edit Mode
  */
 public function initPasswordForm()
 {
     global $lng, $ilUser, $ilSetting;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     // Check whether password change is allowed
     if ($this->allowPasswordChange()) {
         // The current password needs to be checked for verification
         // unless the user uses Shibboleth authentication with additional
         // local authentication for WebDAV.
         //if (
         //	($ilUser->getAuthMode(true) != AUTH_SHIBBOLETH || !$ilSetting->get("shib_auth_allow_local"))
         //)
         if ($ilUser->getAuthMode(true) == AUTH_LOCAL) {
             // current password
             $cpass = new ilPasswordInputGUI($lng->txt("current_password"), "current_password");
             $cpass->setRetype(false);
             $cpass->setSkipSyntaxCheck(true);
             // only if a password exists.
             if ($ilUser->getPasswd()) {
                 $cpass->setRequired(true);
             }
             $this->form->addItem($cpass);
         }
         // new password
         $ipass = new ilPasswordInputGUI($lng->txt("desired_password"), "new_password");
         $ipass->setRequired(true);
         $ipass->setInfo(ilUtil::getPasswordRequirementsInfo());
         if ($ilSetting->get("passwd_auto_generate") == 1) {
             $ipass->setPreSelection(true);
             $this->form->addItem($ipass);
             $this->form->addCommandButton("savePassword", $lng->txt("save"));
             $this->form->addCommandButton("showPassword", $lng->txt("new_list_password"));
         } else {
             $this->form->addItem($ipass);
             $this->form->addCommandButton("savePassword", $lng->txt("save"));
         }
         switch ($ilUser->getAuthMode(true)) {
             case AUTH_LOCAL:
                 $this->form->setTitle($lng->txt("chg_password"));
                 break;
             case AUTH_SHIBBOLETH:
             case AUTH_CAS:
                 require_once 'Services/WebDAV/classes/class.ilDAVServer.php';
                 if (ilDAVServer::_isActive()) {
                     $this->form->setTitle($lng->txt("chg_ilias_and_webfolder_password"));
                 } else {
                     $this->form->setTitle($lng->txt("chg_ilias_password"));
                 }
                 break;
             default:
                 $this->form->setTitle($lng->txt("chg_ilias_password"));
                 break;
         }
         $this->form->setFormAction($this->ctrl->getFormAction($this));
     }
 }