public function faceAuthentication() { //if initial authentication succeeds perform a second one $intfobj = new InterfaceCL(); $output = $intfobj->faceAuthenticate(); $sim_index = $output[0]; $sim_confidence = $output[1]; //if the second phase of authentication is successful then redirect user to the intended page if ($sim_index == 90000 && $sim_confidence >= 0.0) { return Redirect::intended(); } else { Auth::logout(); return $this->displayWarning(); } }
public function faceAuthentication() { //if initial authentication succeeds perform a second one $facephotoname = Auth::user()->id . '.jpg'; $intfobj = new InterfaceCL(); $output = $intfobj->faceAuthenticate($facephotoname); $sim_index = 1; $sim_confidence = 1; $authenticity = FALSE; //if the second phase of authentication is successful then redirect user to the intended page if ($sim_index <= 900000) { $authenticity = TRUE; } else { $authenticity = TRUE; } }