Fix bugs when fetch users group
This commit is contained in:
parent
b2364952a7
commit
33bd6d3d7f
|
@ -638,13 +638,13 @@ ug.date_creation , ug.createur , ug.sponsor1 , ug.sponsor2 , ug.sponsor3, ug.cou
|
|||
if ($init_country != $sponsor_country)
|
||||
return $this->errorResponse(trans('errors.sponsor_not_registered_in_same_country', ['id' => $id]));
|
||||
|
||||
return $this->checkUserIdentification($sponsor->id, $id);
|
||||
return $this->checkUserIdentificationWithSponsorId($sponsor->id, $id);
|
||||
} else {
|
||||
return $this->errorResponse(trans('errors.sponsor_not_found', ['id' => $id]));
|
||||
}
|
||||
}
|
||||
|
||||
public function checkUserIdentification($id_user, $id)
|
||||
public function checkUserIdentificationWithSponsorId($id_user, $id)
|
||||
{
|
||||
$identification = Identification::where('id_user', $id_user)->first();
|
||||
if (isset($identification)) {
|
||||
|
|
Loading…
Reference in New Issue