public static function setRestrictedModulesByUid($uid, $restricted_modules = array()) { self::initModulesRecord($uid); $event = new SysEvent(); $event->setUserListById(array($uid)); $event->sendUpdateModules(); return Mysql::getInstance()->update('user_modules', array('restricted' => serialize($restricted_modules)), array('uid' => intval($uid))); }