Fix bugs when fetch users group

This commit is contained in:
Djery-Tom 2022-02-22 11:29:15 +01:00
parent b2364952a7
commit 33bd6d3d7f
1 changed files with 2 additions and 2 deletions

View File

@ -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)) {