File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -178,12 +178,17 @@ public function onChangeEmail(IUser $user, $oldMailAddress) {
178178 if ($ actor instanceof IUser) {
179179 $ subject = Provider::EMAIL_CHANGED_SELF ;
180180 if ($ actor ->getUID () !== $ user ->getUID ()) {
181+ // set via the OCS API
182+ if ($ this ->config ->getAppValue ('settings ' , 'disable_activity.email_address_changed_by_admin ' , 'no ' ) === 'yes ' ) {
183+ return ;
184+ }
181185 $ subject = Provider::EMAIL_CHANGED ;
182186 }
183187 $ text = $ l ->t ('Your email address on %s was changed. ' , [$ instanceUrl ]);
184188 $ event ->setAuthor ($ actor ->getUID ())
185189 ->setSubject ($ subject );
186190 } else {
191+ // set with occ
187192 if ($ this ->config ->getAppValue ('settings ' , 'disable_activity.email_address_changed_by_admin ' , 'no ' ) === 'yes ' ) {
188193 return ;
189194 }
You can’t perform that action at this time.
0 commit comments