Skip to content

Commit

Permalink
fixup! relax strict getHome behaviour for LDAP users in a shadow state
Browse files Browse the repository at this point in the history
  • Loading branch information
blizzz committed Nov 18, 2019
1 parent 8f2b638 commit dc9ca91
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions apps/user_ldap/lib/User_LDAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,15 +411,13 @@ public function getHome($uid) {

// early return path if it is a deleted user
$user = $this->access->userManager->get($uid);
if($user instanceof OfflineUser) {
return $user->getHomePath() ?: false;
} else if ($user === null) {
if($user instanceof User || $user instanceof OfflineUser) {
$path = $user->getHomePath() ?: false;
} else {
throw new NoUserException($uid . ' is not a valid user anymore');
}

$path = $user->getHomePath();
$this->access->cacheUserHome($uid, $path);

return $path;
}

Expand Down

0 comments on commit dc9ca91

Please sign in to comment.