lonnieezell / myth-auth

One-stop Auth package for CodeIgniter 4
MIT License
632 stars 207 forks source link

Error #610

Closed FirmanAhmadBayumi closed 9 months ago

FirmanAhmadBayumi commented 9 months ago

Error in UserModel.php: Attempt to read property "id" on null

public function withGroup(string $groupName) { $group = $this->db->table('auth_groups')->where('name', $groupName)->get()->getFirstRow();

    $this->assignGroup = $group->id;

    return $this;
}

how to fixed this code ?

FirmanAhmadBayumi commented 9 months ago

Error in UserModel.php: Attempt to read property "id" on null

public function withGroup(string $groupName) { $group = $this->db->table('auth_groups')->where('name', $groupName)->get()->getFirstRow();

    $this->assignGroup = $group->id;

    return $this;
}

how to fixed this code ?

FirmanAhmadBayumi commented 9 months ago

done