Browse Source

Merge pull request #21232 from nextcloud/bug/20427/use-OC-CLI-instead-of-PHP-SAPI

Use \OC::$CLI instead of PHP_SAPI
Roeland Jago Douma 3 years ago
parent
commit
29a096928a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/settings/lib/Hooks.php

+ 1 - 1
apps/settings/lib/Hooks.php

@@ -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);