File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -576,6 +576,21 @@ public function getTimeZoneString() {
576
576
return date_default_timezone_get ();
577
577
}
578
578
579
+ /**
580
+ * @inheritDoc
581
+ */
582
+ public function getUFLocale (): ?string {
583
+ $ userId = $ this ->getLoggedInUfID ();
584
+ if ($ userId ) {
585
+ $ user = $ this ->getUserById ($ userId );
586
+ if ($ user && !empty ($ user ['language ' ])) {
587
+ return $ user ['language ' ];
588
+ }
589
+ }
590
+
591
+ return NULL ;
592
+ }
593
+
579
594
/**
580
595
* @inheritDoc
581
596
* @todo implement language negotiation for Standalone?
@@ -696,12 +711,13 @@ protected function registerDefaultPaths(): void {
696
711
* Standalone's session cannot be initialized until CiviCRM is booted,
697
712
* since it is defined in an extension,
698
713
*
699
- * This used to be when we set timezone, but this is moved to
700
- * standaloneusers_civicrm_config hook to avoid crashing multilingual sites`
714
+ * This is also when we set timezone
701
715
*/
702
716
public function postContainerBoot (): void {
703
717
$ sess = \CRM_Core_Session::singleton ();
704
718
$ sess ->initialize ();
719
+
720
+ $ this ->setTimeZone ();
705
721
}
706
722
707
723
}
You can’t perform that action at this time.
0 commit comments