gpt4 book ai didi

php - WP 在 usermeta 表上触发更新查询

转载 作者:行者123 更新时间:2023-11-29 06:49:36 25 4
gpt4 key购买 nike

我们有一个包含大量插件的 WordPress 网站,它经常在 usermeta 表上触发更新查询,我们已停用所有插件,但查询仍在触发。下面提到了查询,它通常在访问网站管理员时触发。

UPDATE `wptest_usermeta` SET `meta_value` = 'a:84:{s:13:\"administrator\";b:1;s:16:\"activate_plugins\";b:1;s:9:\"add_users\";b:1;s:16:\"aiosp_manage_seo\";b:1;s:24:\"assign_feed_source_terms\";b:1;s:17:\"assign_feed_terms\";b:1;s:17:\"assign_topic_tags\";b:1;s:10:\"copy_posts\";b:1;s:12:\"create_pages\";b:1;s:12:\"create_posts\";b:1;s:12:\"create_roles\";b:1;s:12:\"create_users\";b:1;s:11:\"delete_feed\";b:1;s:18:\"delete_feed_source\";b:1;s:24:\"delete_feed_source_terms\";b:1;s:19:\"delete_feed_sources\";b:1;s:17:\"delete_feed_terms\";b:1;s:12:\"delete_feeds\";b:1;s:13:\"delete_forums\";b:1;s:26:\"delete_others_feed_sources\";b:1;s:19:\"delete_others_feeds\";b:1;s:20:\"delete_others_forums\";b:1;s:19:\"delete_others_pages\";b:1;s:19:\"delete_others_posts\";b:1;s:21:\"delete_others_replies\";b:1;s:20:\"delete_others_topics\";b:1;s:12:\"delete_pages\";b:1;s:14:\"delete_plugins\";b:1;s:12:\"delete_posts\";b:1;s:27:\"delete_private_feed_sources\";b:1;s:20:\"delete_private_feeds\";b:1;s:20:\"delete_private_pages\";b:1;s:20:\"delete_private_posts\";b:1;s:29:\"delete_published_feed_sources\";b:1;s:22:\"delete_published_feeds\";b:1;s:22:\"delete_published_pages\";b:1;s:22:\"delete_published_posts\";b:1;s:14:\"delete_replies\";b:1;s:12:\"delete_roles\";b:1;s:13:\"delete_themes\";b:1;s:17:\"delete_topic_tags\";b:1;s:13:\"delete_topics\";b:1;s:12:\"delete_users\";b:1;s:14:\"edit_dashboard\";b:1;s:9:\"edit_feed\";b:1;s:16:\"edit_feed_source\";b:1;s:22:\"edit_feed_source_terms\";b:1;s:17:\"edit_feed_sources\";b:1;s:15:\"edit_feed_terms\";b:1;s:10:\"edit_feeds\";b:1;s:11:\"edit_forums\";b:1;s:24:\"edit_others_feed_sources\";b:1;s:17:\"edit_others_feeds\";b:1;s:18:\"edit_others_forums\";b:1;s:17:\"edit_others_pages\";b:1;s:17:\"edit_others_posts\";b:1;s:19:\"edit_others_replies\";b:1;s:18:\"edit_others_topics\";b:1;s:10:\"edit_pages\";b:1;s:12:\"edit_plugins\";b:1;s:10:\"edit_posts\";b:1;s:25:\"edit_private_feed_sources\";b:1;s:18:\"edit_private_feeds\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"edit_private_posts\";b:1;s:27:\"edit_published_feed_sources\";b:1;s:20:\"edit_published_feeds\";b:1;s:20:\"edit_published_pages\";b:1;s:20:\"edit_published_posts\";b:1;s:34:\"wpml_manage_translation_management\";b:1;s:21:\"wpml_manage_languages\";b:1;s:41:\"wpml_manage_theme_and_plugin_localization\";b:1;s:19:\"wpml_manage_support\";b:1;s:36:\"wpml_manage_woocommerce_multilingual\";b:1;s:37:\"wpml_operate_woocommerce_multilingual\";b:1;s:29:\"wpml_manage_media_translation\";b:1;s:22:\"wpml_manage_navigation\";b:1;s:24:\"wpml_manage_sticky_links\";b:1;s:30:\"wpml_manage_string_translation\";b:1;s:33:\"wpml_manage_translation_analytics\";b:1;s:25:\"wpml_manage_wp_menus_sync\";b:1;s:32:\"wpml_manage_taxonomy_translation\";b:1;s:27:\"wpml_manage_troubleshooting\";b:1;s:31:\"wpml_manage_translation_options\";b:1;}' WHERE `user_id` = 1 AND `meta_key` = 'wptest_capabilities' - (0.0025379657745361 s)

这是 WordPress 的默认例程吗?或者有人可以帮助我确定在哪里可以找到此查询吗?或者可能是对网站的攻击?

最佳答案

这是在 WordPress 中创建或更新 usermeta 的默认且简单的方法。

请看这个函数:

update_user_meta( $user_id, $meta_key, $meta_value);

如果元 key 已存在于数据库中,则它将更新,否则它将为用户创建新的元值

关于php - WP 在 usermeta 表上触发更新查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48034574/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com