コード例 #1
0
 public function onPrintCard()
 {
     $locationId = post('printerLocation');
     if (empty($locationId)) {
         Flash::error(Lang::get('dma.friends::lang.user.memberCardLocation'));
         return;
     }
     $location = Location::find($locationId);
     $user = post('User');
     $user = User::where('email', '=', $user['email'])->first();
     try {
         $manager = new PrintManager($location, $user);
         $manager->printIdCard();
         Flash::info(Lang::get('dma.friends::lang.user.memberCard', ['title' => $location->title]));
     } catch (SystemException $e) {
         Flash::error($e->getMessage());
     }
 }
コード例 #2
0
 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);
 }