Completed
Push — master ( 2f299a...036503 )
by Ron
12:27 queued 05:09
created
app/Http/Controllers/UserController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
         $roles = Role::all();
42 42
         
43 43
         $roleArr = [];
44
-        foreach($roles as $role)
44
+        foreach ($roles as $role)
45 45
         {
46
-            if($role->role_id == 1 && Auth::user()->role_id != 1)
46
+            if ($role->role_id == 1 && Auth::user()->role_id != 1)
47 47
             {
48 48
                 continue;
49 49
             }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         {
97 97
             Mail::to($request->email)->send(new InitializeUser($hash, $request->username, $request->first_name.' '.$request->last_name));
98 98
         }
99
-        catch(Exception $e)
99
+        catch (Exception $e)
100 100
         {
101 101
             report($e);
102 102
         }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
         //  Validate the hash token
115 115
         $user = UserInitialize::where('token', $hash)->get();
116 116
         
117
-        if($user->isEmpty())
117
+        if ($user->isEmpty())
118 118
         {
119 119
             return abort(404);
120 120
         }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     {
128 128
         //  Verify that the link matches the assigned email address
129 129
         $valid = UserInitialize::where('token', $hash)->first();
130
-        if(empty($valid))
130
+        if (empty($valid))
131 131
         {
132 132
             Log::notice('Someone tried to access an invalid User Initialization link - '.$hash);
133 133
             return abort(404);
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
         $userRole = DB::select('SELECT `role_id` FROM `user_role` WHERE `user_id` = ?', [$id])[0]->role_id;
208 208
         
209 209
         $roleArr = [];
210
-        foreach($roles as $role)
210
+        foreach ($roles as $role)
211 211
         {
212
-            if($role->role_id == 1 && Auth::user()->role_id != 1)
212
+            if ($role->role_id == 1 && Auth::user()->role_id != 1)
213 213
             {
214 214
                 continue;
215 215
             }
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         $linkController = new FileLinksController();        
266 266
         $links = FileLinks::where('user_id', $id)->get();
267 267
         
268
-        foreach($links as $link)
268
+        foreach ($links as $link)
269 269
         {
270 270
             $linkController->destroy($link->link_id);
271 271
         }
Please login to merge, or discard this patch.