File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,9 @@ function hook_chatwoot_output($vars)
69
69
}
70
70
71
71
# user basic info
72
- $ client = CurrentUser::client (); //Menu::context('client');
73
- $ user = CurrentUser::user ();
72
+ $ currentUser = new CurrentUser ;
73
+ $ client = $ currentUser ->client ();
74
+ $ user = $ currentUser ->user ();
74
75
$ ipaddress = $ _SERVER ['REMOTE_ADDR ' ];
75
76
$ ip = gethostbyaddr ($ ipaddress );
76
77
$ currentpage = (isset ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] === 'on ' ? "https " : "http " ) . ":// $ _SERVER [HTTP_HOST ]$ _SERVER [REQUEST_URI ]" ;
@@ -85,7 +86,7 @@ function hook_chatwoot_output($vars)
85
86
}
86
87
87
88
# Get client ID and set contact ID
88
- if ($ user && $ client && $ user ->isOwner (CurrentUser:: client () )) {
89
+ if ($ user && $ client && $ user ->isOwner ( $ client )) {
89
90
$ ClientID = $ client ->id ; //$vars['clientsdetails']['id'];
90
91
} elseif ($ user ) {
91
92
$ ownedClients = $ user ->ownedClients ()->all ();
You can’t perform that action at this time.
0 commit comments