From 55ee906ba36cf66c3a390c98dde75e241de26e65 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 7 May 2016 18:05:33 -0400 Subject: Added support for language LDAP attribute --- app/Core/Base.php | 2 ++ app/Core/Ldap/User.php | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'app/Core') diff --git a/app/Core/Base.php b/app/Core/Base.php index c065ea2a..39a8ccd6 100644 --- a/app/Core/Base.php +++ b/app/Core/Base.php @@ -65,6 +65,7 @@ use Pimple\Container; * @property \Kanboard\Model\ProjectFile $projectFile * @property \Kanboard\Model\Group $group * @property \Kanboard\Model\GroupMember $groupMember + * @property \Kanboard\Model\Language $language * @property \Kanboard\Model\LastLogin $lastLogin * @property \Kanboard\Model\Link $link * @property \Kanboard\Model\Notification $notification @@ -95,6 +96,7 @@ use Pimple\Container; * @property \Kanboard\Model\TaskPosition $taskPosition * @property \Kanboard\Model\TaskStatus $taskStatus * @property \Kanboard\Model\TaskMetadata $taskMetadata + * @property \Kanboard\Model\Timezone $timezone * @property \Kanboard\Model\Transition $transition * @property \Kanboard\Model\User $user * @property \Kanboard\Model\UserLocking $userLocking diff --git a/app/Core/Ldap/User.php b/app/Core/Ldap/User.php index d0036ea7..c54aa1ac 100644 --- a/app/Core/Ldap/User.php +++ b/app/Core/Ldap/User.php @@ -146,7 +146,8 @@ class User $entry->getFirstValue($this->getAttributeEmail()), $this->getRole($groupIds), $groupIds, - $entry->getFirstValue($this->getAttributePhoto()) + $entry->getFirstValue($this->getAttributePhoto()), + $entry->getFirstValue($this->getAttributeLanguage()) ); } @@ -166,6 +167,7 @@ class User $this->getAttributeEmail(), $this->getAttributeGroup(), $this->getAttributePhoto(), + $this->getAttributeLanguage(), ))); } @@ -236,6 +238,17 @@ class User return strtolower(LDAP_USER_ATTRIBUTE_PHOTO); } + /** + * Get LDAP language attribute + * + * @access public + * @return string + */ + public function getAttributeLanguage() + { + return strtolower(LDAP_USER_ATTRIBUTE_LANGUAGE); + } + /** * Get LDAP Group User filter * -- cgit v1.2.3