|
12 | 12 | * @author Julius Härtl <jus@bitgrid.net> |
13 | 13 | * @author Leon Klingele <leon@struktur.de> |
14 | 14 | * @author Lukas Reschke <lukas@statuscode.ch> |
15 | | - * @author Marc Hefter <marchefter@march42.net> |
16 | 15 | * @author Morris Jobke <hey@morrisjobke.de> |
17 | 16 | * @author Robin Appelman <robin@icewind.nl> |
18 | 17 | * @author Roeland Jago Douma <roeland@famdouma.nl> |
@@ -588,104 +587,4 @@ public function triggerChange($feature, $value = null, $oldValue = null) { |
588 | 587 | $this->emitter->emit('\OC\User', 'changeUser', [$this, $feature, $value, $oldValue]); |
589 | 588 | } |
590 | 589 | } |
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 | | - } |
691 | 590 | } |
0 commit comments