public function afterSave()
 {
     parent::afterSave();
     if (!$this->regex) {
         $this->hostname = substr(str_replace(".*", "*", stripslashes($this->hostname)), 1, -1);
     }
 }
 public function afterSave()
 {
     parent::afterSave();
     $this->ip_from = long2ip($this->ip_from);
     $this->ip_to = long2ip($this->ip_to);
 }
 public function afterSave()
 {
     parent::afterSave();
     if (!$this->prefs) {
         $mod = new UserPrefModel();
         $mod->user_id = $this->id();
         $mod->save(false, true);
     }
 }