summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/User/Manager.php
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2017-04-24 12:17:04 +0200
committerGitHub <noreply@github.com>2017-04-24 12:17:04 +0200
commit42e805f0578b95206fdddabfe6234b0880c27b1e (patch)
treed9dc2870f2727ac0b35e95681ebc320222c5cc17 /apps/user_ldap/lib/User/Manager.php
parent3d671cc536b1b472c746fd4ea8f60135f4935a44 (diff)
parent5fa218051bb7cafe9acfdc223fe6a6d4605dacdc (diff)
downloadnextcloud-server-42e805f0578b95206fdddabfe6234b0880c27b1e.tar.gz
nextcloud-server-42e805f0578b95206fdddabfe6234b0880c27b1e.zip
Merge pull request #1023 from GitHubUser4234/ldap_password_renew_pr
Handle password expiry in user_ldap
Diffstat (limited to 'apps/user_ldap/lib/User/Manager.php')
-rw-r--r--apps/user_ldap/lib/User/Manager.php34
1 files changed, 22 insertions, 12 deletions
diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php
index 18430a90cc7..ea4d071b646 100644
--- a/apps/user_ldap/lib/User/Manager.php
+++ b/apps/user_ldap/lib/User/Manager.php
@@ -34,6 +34,7 @@ use OCP\IConfig;
use OCP\IDBConnection;
use OCP\Image;
use OCP\IUserManager;
+use OCP\Notification\IManager as INotificationManager;
/**
* Manager
@@ -51,6 +52,12 @@ class Manager {
/** @var IDBConnection */
protected $db;
+ /** @var IUserManager */
+ protected $userManager;
+
+ /** @var INotificationManager */
+ protected $notificationManager;
+
/** @var FilesystemHelper */
protected $ocFilesystem;
@@ -85,17 +92,19 @@ class Manager {
public function __construct(IConfig $ocConfig,
FilesystemHelper $ocFilesystem, LogWrapper $ocLog,
IAvatarManager $avatarManager, Image $image,
- IDBConnection $db, IUserManager $userManager) {
-
- $this->ocConfig = $ocConfig;
- $this->ocFilesystem = $ocFilesystem;
- $this->ocLog = $ocLog;
- $this->avatarManager = $avatarManager;
- $this->image = $image;
- $this->db = $db;
- $this->userManager = $userManager;
- $this->usersByDN = new CappedMemoryCache();
- $this->usersByUid = new CappedMemoryCache();
+ IDBConnection $db, IUserManager $userManager,
+ INotificationManager $notificationManager) {
+
+ $this->ocConfig = $ocConfig;
+ $this->ocFilesystem = $ocFilesystem;
+ $this->ocLog = $ocLog;
+ $this->avatarManager = $avatarManager;
+ $this->image = $image;
+ $this->db = $db;
+ $this->userManager = $userManager;
+ $this->notificationManager = $notificationManager;
+ $this->usersByDN = new CappedMemoryCache();
+ $this->usersByUid = new CappedMemoryCache();
}
/**
@@ -118,7 +127,8 @@ class Manager {
$this->checkAccess();
$user = new User($uid, $dn, $this->access, $this->ocConfig,
$this->ocFilesystem, clone $this->image, $this->ocLog,
- $this->avatarManager, $this->userManager);
+ $this->avatarManager, $this->userManager,
+ $this->notificationManager);
$this->usersByDN[$dn] = $user;
$this->usersByUid[$uid] = $user;
return $user;