Ignore:
Timestamp:
02/10/24 17:58:54 (11 months ago)
Author:
bube-ristovska <ristovska725@…>
Branches:
main
Children:
92df8cd
Parents:
6dec591
Message:

Bug with embg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/Http/Controllers/SessionsController.php

    r6dec591 rd9c4096  
    2828        }
    2929        if($exists == null) {
    30             return back()->withErrors(['badge_no' => 'Invalid credentials']);
     30            return back()->withErrors(['badge_no' => 'Invalid badge_no']);
    3131        }
    3232
     
    4141            Session::put('badge_no', $badge_no);
    4242            Session::put('is_policeman', $policeman);
    43             Session::put('pe_id', $exists[0]->pe_id);
     43            if($policeman){
     44                Session::put('p_id', $exists[0]->p_id);
     45            } else {
     46                Session::put('pe_id', $exists[0]->pe_id);
     47            }
    4448            return redirect()->intended('/');
    4549        }
Note: See TracChangeset for help on using the changeset viewer.