Example #1
0
 public function onIpCountExceeded(User $user)
 {
     if ($user->is_locked < 0) {
         return;
     }
     // auto-lock disabled
     if (in_array('email-admin', $this->getDi()->config->get('max_ip_actions', array()))) {
         // email admin - @todo not implemented yet
         //            $tpl = Am_Mail_Template::load('max_ip_actions');
         //            if (!$tpl) return;
         //            $et->name = "max_ip_actions";
         //            mail_template_admin($t, $et);
     }
     if (in_array('disable-user', $this->getDi()->config->get('max_ip_actions', array()))) {
         // disable customer
         $user->lock();
     }
 }
 public function unlockUser($id, User $user)
 {
     $user->lock(false);
 }