111 if ($this->password_manager->allowPasswordChange($this->user)) {
112 $pw_info_set =
false;
114 $cpass = $this->ui_factory->input()->field()->password(
115 $this->
lng->txt(self::CURRENT_PASSWORD),
120 if ($this->
user->getPasswd()) {
121 $cpass = $cpass->withRequired(
true);
123 $cpass = $cpass->withRevelation(
true);
124 $cpass_error = $errors[self::CURRENT_PASSWORD] ?? [];
125 if ($cpass_error !== []) {
126 $cpass = $cpass->withError(implode(
'<br>', $cpass_error));
128 $cpass = $cpass->withAdditionalTransformation(
132 LocalUserPasswordManager::getInstance()->verifyPassword(
136 }, $this->
lng->txt(
'passwd_wrong'))
139 $items[self::CURRENT_PASSWORD] = $cpass;
143 $ipass = $this->ui_factory->input()->field()->password(
144 $this->
lng->txt(
'desired_password'),
146 if ($pw_info_set ===
false) {
149 $ipass = $ipass->withRequired(
true);
150 $ipass = $ipass->withRevelation(
true);
151 $ipass_error = $errors[self::NEW_PASSWORD] ?? [];
152 if ($ipass_error !== []) {
153 $ipass = $ipass->withError(implode(
'<br>', $ipass_error));
155 $ipass = $ipass->withAdditionalTransformation(
161 if ($custom_error !==
'' && $custom_error !==
null) {
162 return $custom_error;
165 return $this->
lng->txt(
'passwd_invalid');
168 $ipass = $ipass->withAdditionalTransformation(
169 $this->
refinery->custom()->constraint(
184 return $this->
lng->txt($error_lng_var ??
'');
188 $items[self::NEW_PASSWORD] = $ipass;
190 switch ($this->
user->getAuthMode(
true)) {
192 $title = $this->
lng->txt(
'chg_password');
198 $title = $this->
lng->txt(
'chg_ilias_and_webfolder_password');
200 $title = $this->
lng->txt(
'chg_ilias_password');
205 $title = $this->
lng->txt(
'chg_ilias_password');
209 $section = $this->ui_factory->input()->field()->section($items, $title);
210 $items = [
'password' => $section];
213 return $this->ui_factory->input()->container()->form()->standard(
214 $this->
ctrl->getLinkTarget($this,
'savePassword'),
216 )->withSubmitLabel($this->
lng->txt(
'save'));
static isPassword(string $a_passwd, ?string &$customError=null)
A password is used as part of credentials for authentication.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static isPasswordValidForUserContext(string $clear_text_password, $user, ?string &$error_language_variable=null)
static getPasswordRequirementsInfo()
infotext for ilPasswordInputGUI setInfo()