$result = $this -> validate($data,$rule,$msg);
//If the verification passes Execution
if($result === true){
//Construct query conditions
$map = [
'name' => $data['name'],
'password' =>md5($data['password']),
];
//Query user information
$user = UserModel::get($map);
if($user == null){
$result = 'The user was not found';
}else {
$status = 1;
$result = 'Verification passed, click [Confirm] to enter';
//Use session to set user login information
Session::set('user_id',$user->id); //User ID
session::set( 'user_info',$user->getData()); //Get all user information
//Update user login times: increase by 1
$user -> setInc('login_count'); 'message'=>$result,'data'=>$data];
}
##
I also encountered the same problem. When logging in with admin, it said that the user does not exist, but it is clearly in the database; logging in with peter was no problem. I don't know what's going on either