Use \OC::$CLI instead of PHP_SAPI

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-06-04 11:31:09 +02:00 committed by backportbot[bot]
parent a1204be15b
commit 26f72d1aec
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ class Hooks {
->setSubject(Provider::PASSWORD_CHANGED_SELF); ->setSubject(Provider::PASSWORD_CHANGED_SELF);
} }
} else { } else {
if (PHP_SAPI === 'cli') { if (\OC::$CLI) {
// Admin used occ to reset the password // Admin used occ to reset the password
$text = $this->l->t('Your password on %s was reset by an administrator.', [$instanceUrl]); $text = $this->l->t('Your password on %s was reset by an administrator.', [$instanceUrl]);
$event->setSubject(Provider::PASSWORD_RESET); $event->setSubject(Provider::PASSWORD_RESET);