Skip to content

Commit 78e3cc3

Browse files
committed
fix: if surname or displayname are null, set to empty string for Koha
If the surname or displayname from Koha are null then we cannot insert in to the aspen DB. We need to set these to empty strings in this case so we can still create an aspen user. This is especially true for sso as currently we cannot enrich koha users with IdP data as it uses screen scraping.
1 parent aa41b0c commit 78e3cc3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

code/web/sys/Account/User.php

+6
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,12 @@ function insert($context = '') {
11151115
if ($this->firstname === null) {
11161116
$this->firstname = '';
11171117
}
1118+
if ($this->lastname === null) {
1119+
$this->lastname = '';
1120+
}
1121+
if ($this->displayName === null) {
1122+
$this->displayName = '';
1123+
}
11181124
if ($context == 'development') {
11191125
$this->source = 'development';
11201126
$this->homeLocationId = 0;

0 commit comments

Comments
 (0)