mirror of
https://github.com/PanCakeConnaisseur/auto_mail_accounts.git
synced 2024-05-02 13:52:46 +02:00
Add first account assumption comment
This commit is contained in:
parent
b6b3820e99
commit
54f725ddb9
|
@ -140,6 +140,9 @@ class UserHooks {
|
||||||
|
|
||||||
private function changeUserCallbackFunction() {
|
private function changeUserCallbackFunction() {
|
||||||
return function (\OC\User\User $user, string $feature, string $value) {
|
return function (\OC\User\User $user, string $feature, string $value) {
|
||||||
|
// The assumption is made that the automatically created mail
|
||||||
|
// account is the first one, because it was automatically created
|
||||||
|
// immediately after the creation of the user.
|
||||||
$firstAccountsMailAccount = $this->getUsersFirstMailAccount($user);
|
$firstAccountsMailAccount = $this->getUsersFirstMailAccount($user);
|
||||||
|
|
||||||
if ($feature === 'displayName') {
|
if ($feature === 'displayName') {
|
||||||
|
@ -153,6 +156,9 @@ class UserHooks {
|
||||||
|
|
||||||
private function changePasswordCallbackFunction() {
|
private function changePasswordCallbackFunction() {
|
||||||
return function (\OC\User\User $user, string $password) {
|
return function (\OC\User\User $user, string $password) {
|
||||||
|
// The assumption is made that the automatically created mail
|
||||||
|
// account is the first one, because it was automatically created
|
||||||
|
// immediately after the creation of the user.
|
||||||
$firstAccountsMailAccount = $this->getUsersFirstMailAccount($user);
|
$firstAccountsMailAccount = $this->getUsersFirstMailAccount($user);
|
||||||
$firstAccountsMailAccount->setInboundPassword($this->encrypt($password));
|
$firstAccountsMailAccount->setInboundPassword($this->encrypt($password));
|
||||||
$firstAccountsMailAccount->setOutboundPassword($this->encrypt($password));
|
$firstAccountsMailAccount->setOutboundPassword($this->encrypt($password));
|
||||||
|
|
Loading…
Reference in a new issue