public function actionDeleteLog($t) { $this->resource = UserResources::RES_USER_ACTIVITY; $this->hasPrivilege(Acl::ACTION_DELETE); if ($ids = filter_input(INPUT_POST, 'ids')) { if ($t === self::LOG_ACTIVITY) { UserActivityLog::model()->deleteMany($ids); } else { UserLoginLog::model()->deleteMany($ids); } } }
/** * Add login log for Admin/Staff users */ protected function addLogInLog() { UserLoginLog::model()->addRecord(array('user_id' => $this->_id, 'ip' => Common::getIp())); }