Skip to content

Commit 59a364d

Browse files
committed
Merge branch 'pu/pm/CoursesDivisImportTeacherUsernameCmpFixed' into '2024.11'
tweak(Courses) fix teacher username temp generation See merge request tine20/tine20!7185
2 parents fb3b7d9 + c37a143 commit 59a364d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tine20/Courses/Import/DivisCourses.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,12 @@ protected function _skipAccount(Tinebase_Model_FullUser $account): bool
855855

856856
protected function _getLehrerUserName(array $raw): string
857857
{
858-
return strtolower(substr($raw[0], 0, 1) . '.' . $raw[1]);
858+
$tmp = new Tinebase_Model_FullUser([
859+
'accountFirstName' => $raw[0],
860+
'accountLastName' => $raw[1],
861+
], true);
862+
$tmp->applyTwigTemplates();
863+
return $tmp->shortenUsername();
859864
}
860865

861866
protected function _getRawData(&$_resource)

0 commit comments

Comments
 (0)