RSS Feed/News Prevent email on user upgrade

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,700
Points
823

Reputation:

I am trying to upgrade a user programmatically and each time I do so, the payment_received email is sent out to the upgraded account.

Is there a way to suppress these? I tried $upgradeService->setSendAlert(false);, but setSendAlert doesn't seem to be valid.

PHP:

Code:
  $upgradeService = $app->service('XF:User\Upgrade', $userUpgrade, $username);
  $upgradeService->setEndDate($timestamp);
  $upgradeService->upgrade();

Thank you!

Continue reading...
 
Status
Not open for further replies.
Top