Example #1
0
 protected final function ensureLogin()
 {
     $user_type_list = func_get_args();
     if (TRUE === Kit::in('Administrator', $user_type_list)) {
         return;
     }
     // @TODO: CAUTION
     if (FALSE === c::isLogin($user_type_list)) {
         throw new UserException('Login failed.');
     }
 }
Example #2
0
 public final function isMe()
 {
     return $this->getId()->isEqualTo(c::user()->getId());
 }