Skip to content

Commit 4ad0dd1

Browse files
committed
Replaced Auth::user with auth()->user just for future easier location of all entries
1 parent c6a2199 commit 4ad0dd1

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/Controllers/CommentsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function validation_common($request, $new_comment = true)
9090

9191
$common_data = [
9292
'request' => $request,
93-
'member' => \PanicHDMember::findOrFail(\Auth::user()->id),
93+
'member' => \PanicHDMember::findOrFail(auth()->user()->id),
9494
'a_content' => $a_content,
9595
'a_result_errors' => $a_result_errors
9696
];

src/Controllers/ConfigurationsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function update(Request $request, $id)
118118
$value = $request->value;
119119

120120
if ($request->serialize) {
121-
//if(!Hash::check($request->password, Auth::user()->password)){
121+
//if(!Hash::check($request->password, auth()->user()->password)){
122122
if (!Auth::attempt($request->only('password'), false, false)) {
123123
return back()->withErrors([trans('panichd::admin.config-edit-auth-failed')]);
124124
}

src/Models/Member.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ public static function isAdmin()
126126
*/
127127
public static function isAssignedAgent($id)
128128
{
129-
if (auth()->check() && Auth::user()->panichd_agent) {
130-
if (Auth::user()->id == Ticket::find($id)->agent->id) {
129+
if (auth()->check() && auth()->user()->panichd_agent) {
130+
if (auth()->user()->id == Ticket::find($id)->agent->id) {
131131
return true;
132132
}
133133
}

src/Views/master.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
@else
5656
<li class="dropdown">
5757
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
58-
{{ Auth::user()->name }} <span class="caret"></span>
58+
{{ auth()->user()->name }} <span class="caret"></span>
5959
</a>
6060

6161
<ul class="dropdown-menu" role="menu">

0 commit comments

Comments
 (0)