summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/user/user.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/user/user.php')
-rw-r--r--apps/user_ldap/lib/user/user.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/user/user.php b/apps/user_ldap/lib/user/user.php
index d4d2294307d..7f67ebca39b 100644
--- a/apps/user_ldap/lib/user/user.php
+++ b/apps/user_ldap/lib/user/user.php
@@ -92,7 +92,7 @@ class User {
* @param string the LDAP DN
* @param IUserTools $access an instance that implements IUserTools for
* LDAP interaction
- * @param \OCP\Config
+ * @param \OCP\IConfig
* @param FilesystemHelper
* @param \OCP\Image any empty instance
* @param LogWrapper
@@ -213,6 +213,31 @@ class User {
}
/**
+ * Stores a key-value pair in relation to this user
+ * @param string $key
+ * @param string $value
+ */
+ private function store($key, $value) {
+ $this->config->setUserValue($this->uid, 'user_ldap', $key, $value);
+ }
+
+ /**
+ * Stores the display name in the databae
+ * @param string $displayName
+ */
+ public function storeDisplayName($displayName) {
+ $this->store('displayName', $displayName);
+ }
+
+ /**
+ * Stores the LDAP Username in the Database
+ * @param string $userName
+ */
+ public function storeLDAPUserName($userName) {
+ $this->store('uid', $userName);
+ }
+
+ /**
* @brief checks whether an update method specified by feature was run
* already. If not, it will marked like this, because it is expected that
* the method will be run, when false is returned.