]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use \OC::$CLI instead of PHP_SAPI 21232/head
authorThomas Citharel <tcit@tcit.fr>
Thu, 4 Jun 2020 09:31:09 +0000 (11:31 +0200)
committerThomas Citharel <tcit@tcit.fr>
Thu, 4 Jun 2020 09:31:09 +0000 (11:31 +0200)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
apps/settings/lib/Hooks.php

index 24dc40f2494e77ea8395b4a0b31ddfbf2a78e118..ed72194488d9b33e83caa2109ba75e39e56351d6 100644 (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);