Merge pull request #21242 from nextcloud/backport/21232/stable19

[stable19] Use \OC::$CLI instead of PHP_SAPI
This commit is contained in:
Roeland Jago Douma 2020-06-05 08:53:22 +02:00 committed by GitHub
commit 70c174566b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,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);