]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use \OC::$CLI instead of PHP_SAPI 21230/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:34:33 +0000 (11:34 +0200)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
apps/settings/lib/Hooks.php

index aea24b81df6ab8d12d1c9d27dc2578254c49d2f6..ba5b572c41ac913848963cea0486322279c64d2b 100644 (file)
@@ -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);