mirror of
https://github.com/nextcloud/server.git
synced 2024-08-26 05:54:48 +02:00
Don't trigger activity when the email didn't change
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
c1925ddfd0
commit
7ef6f065ca
@ -117,6 +117,12 @@ class Hooks {
|
|||||||
* @throws \BadMethodCallException
|
* @throws \BadMethodCallException
|
||||||
*/
|
*/
|
||||||
public function onChangeEmail(IUser $user, $oldMailAddress) {
|
public function onChangeEmail(IUser $user, $oldMailAddress) {
|
||||||
|
|
||||||
|
if ($oldMailAddress === $user->getEMailAddress()) {
|
||||||
|
// Email didn't really change, so don't create activities and emails
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$event = $this->activityManager->generateEvent();
|
$event = $this->activityManager->generateEvent();
|
||||||
$event->setApp('settings')
|
$event->setApp('settings')
|
||||||
->setType('personal_settings')
|
->setType('personal_settings')
|
||||||
|
Loading…
Reference in New Issue
Block a user