File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -70,5 +70,10 @@ function ($expression) {
7070 public function register ()
7171 {
7272 $ this ->app ->bind ('timezone ' , Timezone::class);
73+
74+ $ this ->mergeConfigFrom (
75+ __DIR__ . '/config/timezone.php ' ,
76+ 'timezone '
77+ );
7378 }
7479}
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ public function handle(Login $event)
1818 $ ip = $ this ->getFromLookup ();
1919 $ geoip_info = geoip ()->getLocation ($ ip );
2020
21- if ( auth ()->user ()-> timezone != $ geoip_info [ ' timezone ' ]) {
22- if (config ( ' timezone.overwrite ' ) == true || auth ()-> user () ->timezone == null ) {
23- $ user = auth ()-> user ();
21+ $ user = auth ()->user ();
22+ if ($ user ->timezone != $ geoip_info [ ' timezone ' ] ) {
23+ if ( config ( ' timezone.overwrite ' ) == true || $ user-> timezone == null ) {
2424 $ user ->timezone = $ geoip_info ['timezone ' ];
2525 $ user ->save ();
2626
@@ -70,7 +70,7 @@ public function notify(\Torann\GeoIP\Location $geoip_info)
7070 return ;
7171 }
7272 }
73-
73+
7474 /**
7575 * @return mixed
7676 */
You can’t perform that action at this time.
0 commit comments