From bdb6589482beac25423ff2604818ff3cad06d9a9 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 4 Jun 2020 11:31:09 +0200 Subject: [PATCH] Use \OC::$CLI instead of PHP_SAPI Signed-off-by: Thomas Citharel --- settings/Hooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/Hooks.php b/settings/Hooks.php index 4a057479b30..52760856b31 100644 --- a/settings/Hooks.php +++ b/settings/Hooks.php @@ -123,7 +123,7 @@ class Hooks { ->setSubject(Provider::PASSWORD_CHANGED_SELF); } } else { - if (PHP_SAPI === 'cli') { + if (\OC::$CLI) { // Admin used occ to reset the password $text = $this->l->t('Your password on %s was reset by an administrator.', [$instanceUrl]); $event->setSubject(Provider::PASSWORD_RESET);