Skip to content

Commit

Permalink
fixup! feat(ldap): sync additional properties to profile and SAB
Browse files Browse the repository at this point in the history
  • Loading branch information
st3iny committed May 28, 2024
1 parent e1b5855 commit abef449
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
...birthdate,
readable: NAME_READABLE_ENUM[birthdate.name],
},
initialValue: initialValue ? new Date(initialValue) : new Date(),
initialValue,
}
},

Expand Down Expand Up @@ -110,13 +110,9 @@ export default {
handleResponse({ value, status, errorMessage, error }) {
if (status === 'ok') {
this.initialValue = value
this.showCheckmarkIcon = true
setTimeout(() => { this.showCheckmarkIcon = false }, 2000)
} else {
this.$emit('update:value', this.initialValue)
handleError(error, errorMessage)
this.showErrorIcon = true
setTimeout(() => { this.showErrorIcon = false }, 2000)
}
},
},
Expand Down
4 changes: 3 additions & 1 deletion apps/user_ldap/lib/Service/BirthdateParserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ class BirthdateParserService {
* @throws InvalidArgumentException If the format of then given date is unknown
*/
public function parseBirthdate(string $value): DateTimeImmutable {
if (strlen($value) >= 11) {
// Minimum LDAP generalized date is "1994121610Z" with 11 chars
// While maximum other format is "1994-12-16" with 10 chars
if (strlen($value) > strlen('YYYY-MM-DD')) {
// Probably LDAP generalized time syntax
$value = substr($value, 0, 8);
}
Expand Down
6 changes: 3 additions & 3 deletions dist/settings-vue-settings-personal-info.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-personal-info.js.map

Large diffs are not rendered by default.

0 comments on commit abef449

Please sign in to comment.