/** * Resource to login user via barcode scanner for authorized kiosks */ public static function barcodeLogin() { $barcodeId = get('barcodeId'); $barcodeId = trim($barcodeId); $location = LocationManager::getLocation(); if (!$location || empty($barcodeId)) { return Redirect::to('/'); } if ($location->is_authorized) { $data = ['login' => $barcodeId, 'no_password' => true]; AuthManager::auth($data); } return Redirect::to('/'); }
public function onAuthRegister($user) { // Print the reward if user is at a kiosk $location = LocationManager::getLocation(); if ($location) { $printManager = new PrintManager($location, $user); $printManager->printIdCard(); } // Process Activity for registration Registration::process($user); }