From b210ed6990e85b586dc4b0fec373eb6802d8c394 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 --- apps/settings/lib/Hooks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/lib/Hooks.php b/apps/settings/lib/Hooks.php index aea24b81df6..ba5b572c41a 100644 --- a/apps/settings/lib/Hooks.php +++ b/apps/settings/lib/Hooks.php @@ -125,7 +125,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); -- 2.39.5