Skip to content

Commit 225a46d

Browse files
march42come-nc
andcommitted
undoing the additions to OC\IUser
removed changes from lib/public/IUser.php removed changes from lib/private/User/LazyUser.php removed changes from lib/private/User/User.php Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Marc Hefter <marchefter@gmail.com>
1 parent 51321cb commit 225a46d

3 files changed

Lines changed: 0 additions & 163 deletions

File tree

lib/private/User/LazyUser.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
/**
55
* @copyright Copyright (c) 2022 Robin Appelman <robin@icewind.nl>
66
*
7-
* @author Marc Hefter <marchefter@march42.net>
8-
*
97
* @license GNU AGPL version 3 or any later version
108
*
119
* This program is free software: you can redistribute it and/or modify
@@ -147,20 +145,4 @@ public function getQuota() {
147145
public function setQuota($quota) {
148146
$this->getUser()->setQuota($quota);
149147
}
150-
151-
public function getProfilePropertyValue(string $property): ?string {
152-
return $this->getUser()->getProfilePropertyValue($property);
153-
}
154-
155-
public function getProfilePropertyScope(string $property): ?string {
156-
return $this->getUser()->getProfilePropertyScope($property);
157-
}
158-
159-
public function getProfilePropertyVerified(string $property): ?string {
160-
return $this->getUser()->getProfilePropertyVerified($property);
161-
}
162-
163-
public function setProfileProperty(string $property, $value=null, $scope=null, $verified=null) {
164-
$this->getUser()->setProfileProperty($property, $value, $scope, $verified);
165-
}
166148
}

lib/private/User/User.php

Lines changed: 0 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* @author Julius Härtl <jus@bitgrid.net>
1313
* @author Leon Klingele <leon@struktur.de>
1414
* @author Lukas Reschke <lukas@statuscode.ch>
15-
* @author Marc Hefter <marchefter@march42.net>
1615
* @author Morris Jobke <hey@morrisjobke.de>
1716
* @author Robin Appelman <robin@icewind.nl>
1817
* @author Roeland Jago Douma <roeland@famdouma.nl>
@@ -588,104 +587,4 @@ public function triggerChange($feature, $value = null, $oldValue = null) {
588587
$this->emitter->emit('\OC\User', 'changeUser', [$this, $feature, $value, $oldValue]);
589588
}
590589
}
591-
592-
/**
593-
* @param string $property name of the AccountProperty
594-
* @return ?string AccountProperty value
595-
* @throws InvalidArgumentException when the property name is invalid or null
596-
*/
597-
public function getProfilePropertyValue($property): ?string {
598-
if ($property === null) {
599-
throw new InvalidArgumentException('Property can not be null.');
600-
}
601-
// FIXME: check $property if it's one of the IAccountManager::PROPERTY_* public constants
602-
603-
// FIXME: I need to get the AccountProperty value to return
604-
//return $this->config->getUserValue($this->uid, 'user_ldap', $property, null);
605-
$this->ensureAccountManager();
606-
$account = $this->accountManager->getAccount($this);
607-
$property = $account->getProperty($property);
608-
return $property->getValue();
609-
}
610-
611-
/**
612-
* @param string $property name of the AccountProperty
613-
* @return ?string AccountProperty scope
614-
* @throws InvalidArgumentException when the property name is invalid or null
615-
*/
616-
public function getProfilePropertyScope($property): ?string {
617-
if ($property === null) {
618-
throw new InvalidArgumentException('Property can not be null.');
619-
}
620-
$this->ensureAccountManager();
621-
$account = $this->accountManager->getAccount($this);
622-
// TODO: this should be stored locally, to reduce database overhead
623-
$property = $account->getProperty($property);
624-
return $property->getScope();
625-
}
626-
627-
/**
628-
* @param string $property name of the AccountProperty
629-
* @return ?string AccountProperty verified
630-
* @throws InvalidArgumentException when the property name is invalid or null
631-
*/
632-
public function getProfilePropertyVerified($property): ?string {
633-
if ($property === null) {
634-
throw new InvalidArgumentException('Property can not be null.');
635-
}
636-
$this->ensureAccountManager();
637-
$account = $this->accountManager->getAccount($this);
638-
// TODO: this should be stored locally, to reduce database overhead
639-
$property = $account->getProperty($property);
640-
return $property->getVerified();
641-
}
642-
643-
/**
644-
* @param string $property name of the AccountProperty
645-
* @param string $value AccountProperty value
646-
* @param string $scope AccountProperty scope
647-
* @param string $verified AccountProperty verified
648-
* @return void
649-
* @throws InvalidArgumentException when the property name is invalid or null
650-
*/
651-
public function setProfileProperty($property, $value=null, $scope=null, $verified=null) {
652-
if ($property === null) {
653-
throw new InvalidArgumentException('Property can not be null.');
654-
}
655-
// FIXME: check $property if it's one of the IAccountManager::PROPERTY_* public constants
656-
$this->ensureAccountManager();
657-
$account = $this->accountManager->getAccount($this);
658-
$property = $account->getProperty($property);
659-
if (null !== $value) {
660-
$property->setValue($value);
661-
}
662-
if (null !== $scope) {
663-
// FIXME: should I default to IAccountManager::SCOPE_FEDERATED
664-
$property->setScope($scope);
665-
}
666-
if (null !== $verified) {
667-
// FIXME: should I default to IAccountManager::VERIFIED
668-
$property->setVerified($verified);
669-
}
670-
$this->accountManager->updateAccount($account);
671-
return;
672-
}
673-
674-
/**
675-
* @param string $property name of the AccountProperty
676-
* @param string $value AccountProperty value
677-
* @return void
678-
* @throws InvalidArgumentException when the property name is invalid or null
679-
*/
680-
public function setProfilePropertyValue($property, $value) {
681-
if ($property === null) {
682-
throw new InvalidArgumentException('Property can not be null.');
683-
}
684-
$this->ensureAccountManager();
685-
$account = $this->accountManager->getAccount($this);
686-
$property = $account->getProperty($property);
687-
$property->setValue($value);
688-
$this->accountManager->updateAccount($account);
689-
return;
690-
}
691590
}

lib/public/IUser.php

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
66
* @author John Molakvoæ <skjnldsv@protonmail.com>
77
* @author Lukas Reschke <lukas@statuscode.ch>
8-
* @author Marc Hefter <marchefter@march42.net>
98
* @author Morris Jobke <hey@morrisjobke.de>
109
* @author Robin Appelman <robin@icewind.nl>
1110
* @author Roeland Jago Douma <roeland@famdouma.nl>
@@ -271,47 +270,4 @@ public function getQuota();
271270
* @since 9.0.0
272271
*/
273272
public function setQuota($quota);
274-
275-
/**
276-
* get users' profile property value.
277-
*
278-
* @param string $property name see IAccountManager::PROPERTY_*
279-
* @return string AccountProperty value
280-
* @throws InvalidArgumentException when the property name is invalid or null
281-
* @since 27.0.0
282-
*/
283-
public function getProfilePropertyValue(string $property): ?string;
284-
285-
/**
286-
* get users' profile property scope.
287-
*
288-
* @param string $property name see IAccountManager::PROPERTY_*
289-
* @return string AccountProperty scope IAccountManager::SCOPE_*
290-
* @throws InvalidArgumentException when the property name is invalid or null
291-
* @since 27.0.0
292-
*/
293-
public function getProfilePropertyScope(string $property): ?string;
294-
295-
/**
296-
* get users' profile property verified.
297-
*
298-
* @param string $property name see IAccountManager::PROPERTY_*
299-
* @return string AccountProperty verification status IAccountManager::NOT_VERIFIED/VERIFICATION_IN_PROGRESS/VERIFIED
300-
* @throws InvalidArgumentException when the property name is invalid or null
301-
* @since 27.0.0
302-
*/
303-
public function getProfilePropertyVerified(string $property): ?string;
304-
305-
/**
306-
* set users' profile property value,scope,verified.
307-
*
308-
* @param string $property name from IAccountManager::PROPERTY_*
309-
* @param string $value AccountProperty value
310-
* @param string $scope AccountProperty scope
311-
* @param string $verified AccountProperty verified
312-
* @return void
313-
* @throws InvalidArgumentException when the property name is invalid or null
314-
* @since 27.0.0
315-
*/
316-
public function setProfileProperty(string $property, $value=null, $scope=null, $verified=null);
317273
}

0 commit comments

Comments
 (0)