From: Thomas Citharel Date: Thu, 4 Jun 2020 09:31:09 +0000 (+0200) Subject: Use \OC::$CLI instead of PHP_SAPI X-Git-Tag: v18.0.6~11^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b210ed6990e85b586dc4b0fec373eb6802d8c394;p=nextcloud-server.git Use \OC::$CLI instead of PHP_SAPI Signed-off-by: Thomas Citharel --- 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);