summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-07-02 12:51:51 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-07-02 12:51:51 +0200
commitea62d7a9f53191b66a0d59ebf0760bc61cf1d462 (patch)
treefc6c80e1a32c176c659f1f5eb1a110a86023ad29 /apps
parent56aaa40dde151786bc469a3ded937bb014ff96a5 (diff)
downloadnextcloud-server-ea62d7a9f53191b66a0d59ebf0760bc61cf1d462.tar.gz
nextcloud-server-ea62d7a9f53191b66a0d59ebf0760bc61cf1d462.zip
constants belong to Util in 13
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/User/User.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php
index 9010d68bc6e..53444990b26 100644
--- a/apps/user_ldap/lib/User/User.php
+++ b/apps/user_ldap/lib/User/User.php
@@ -39,6 +39,7 @@ use OCP\Image;
use OCP\IUser;
use OCP\IUserManager;
use OCP\Notification\IManager as INotificationManager;
+use OCP\Util;
/**
* User
@@ -144,7 +145,7 @@ class User {
$this->userManager = $userManager;
$this->notificationManager = $notificationManager;
- \OCP\Util::connectHook('OC_User', 'post_login', $this, 'handlePasswordExpiry');
+ Util::connectHook('OC_User', 'post_login', $this, 'handlePasswordExpiry');
}
/**
@@ -252,7 +253,7 @@ class User {
// system must be postponed after the login. It is to ensure
// external mounts are mounted properly (e.g. with login
// credentials from the session).
- \OCP\Util::connectHook('OC_User', 'post_login', $this, 'updateAvatarPostLogin');
+ Util::connectHook('OC_User', 'post_login', $this, 'updateAvatarPostLogin');
break;
}
}
@@ -510,19 +511,19 @@ class User {
if($aQuota && (count($aQuota) > 0) && $this->verifyQuotaValue($aQuota[0])) {
$quota = $aQuota[0];
} else if(is_array($aQuota) && isset($aQuota[0])) {
- $this->log->log('no suitable LDAP quota found for user ' . $this->uid . ': [' . $aQuota[0] . ']', \OCP\Util::DEBUG);
+ $this->log->log('no suitable LDAP quota found for user ' . $this->uid . ': [' . $aQuota[0] . ']', Util::DEBUG);
}
} else if ($this->verifyQuotaValue($valueFromLDAP)) {
$quota = $valueFromLDAP;
} else {
- $this->log->log('no suitable LDAP quota found for user ' . $this->uid . ': [' . $valueFromLDAP . ']', \OCP\Util::DEBUG);
+ $this->log->log('no suitable LDAP quota found for user ' . $this->uid . ': [' . $valueFromLDAP . ']', Util::DEBUG);
}
if ($quota === false && $this->verifyQuotaValue($defaultQuota)) {
// quota not found using the LDAP attribute (or not parseable). Try the default quota
$quota = $defaultQuota;
} else if($quota === false) {
- $this->log->log('no suitable default quota found for user ' . $this->uid . ': [' . $defaultQuota . ']', ILogger::DEBUG);
+ $this->log->log('no suitable default quota found for user ' . $this->uid . ': [' . $defaultQuota . ']', Util::DEBUG);
return;
}
@@ -530,7 +531,7 @@ class User {
if ($targetUser instanceof IUser) {
$targetUser->setQuota($quota);
} else {
- $this->log->log('trying to set a quota for user ' . $this->uid . ' but the user is missing', \OCP\Util::INFO);
+ $this->log->log('trying to set a quota for user ' . $this->uid . ' but the user is missing', Util::INFO);
}
}
@@ -572,13 +573,13 @@ class User {
*/
private function setOwnCloudAvatar() {
if(!$this->image->valid()) {
- $this->log->log('jpegPhoto data invalid for '.$this->dn, \OCP\Util::ERROR);
+ $this->log->log('jpegPhoto data invalid for '.$this->dn, Util::ERROR);
return;
}
//make sure it is a square and not bigger than 128x128
$size = min(array($this->image->width(), $this->image->height(), 128));
if(!$this->image->centerCrop($size)) {
- $this->log->log('croping image for avatar failed for '.$this->dn, \OCP\Util::ERROR);
+ $this->log->log('croping image for avatar failed for '.$this->dn, Util::ERROR);
return;
}