PHP User::getClass Examples

PHP User::getClass - 7 examples found. These are the top rated real world PHP examples of User::getClass extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
         $statistics->run();
         httpResponse();
         break;
     case validateRoute('GET', 'run-bonus'):
         $log = new Logs($db);
         $bonus = new Bonus($db, $user, $log);
         $bonus->run();
         httpResponse();
         break;
 }
 /* Login check before the following routes */
 $user->loginCheck();
 switch (true) {
     case validateRoute('GET', 'status'):
         /* IP change check and logging */
         if ($user->getClass() < User::CLASS_UPLOADER && ((int) $_GET["timeSinceLastCheck"] < 5100 || $user->getBrowserIp() !== $user->getIp())) {
             $user->logIp();
         }
         /* Only update last access if user refreshed a page recently */
         if ((int) $_GET["timeSinceLastCheck"] < 5100) {
             $user->updateLastAccess();
         }
         httpResponse($user->getStatus());
         break;
     case validateRoute('GET', 'rules'):
         $rules = new Rules($db);
         httpResponse($rules->query());
         break;
     case validateRoute('POST', 'rules'):
         $rules = new Rules($db, $user);
         httpResponse($rules->create($postdata));
Example #2
0
 public function voters()
 {
     return $this->belongsToMany(User::getClass(), 'ticket_votes')->withTimestamps();
 }
Example #3
0
 public function users()
 {
     return $this->hasMany(User::getClass());
 }
 public function provider()
 {
     return $this->belongsTo(User::getClass(), 'provider_id');
 }
Example #5
0
 public function user()
 {
     return $this->belongsTo(User::getClass());
 }
Example #6
0
 public function users()
 {
     $this->belongsToMany(User::getClass(), 'votes')->withTimestamps();
 }
 public function client()
 {
     return $this->belongsTo(User::getClass(), 'client_id');
 }