summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-07 18:05:33 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-07 18:05:33 -0400
commit55ee906ba36cf66c3a390c98dde75e241de26e65 (patch)
treeed4e5419bb6254c97d63d6a5cab5ab74536201a0 /app/Core
parentaac11a609c58ec8356e1ca479da456876034b06c (diff)
Added support for language LDAP attribute
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Base.php2
-rw-r--r--app/Core/Ldap/User.php15
2 files changed, 16 insertions, 1 deletions
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(),
)));
}
@@ -237,6 +239,17 @@ class User
}
/**
+ * Get LDAP language attribute
+ *
+ * @access public
+ * @return string
+ */
+ public function getAttributeLanguage()
+ {
+ return strtolower(LDAP_USER_ATTRIBUTE_LANGUAGE);
+ }
+
+ /**
* Get LDAP Group User filter
*
* @access public