{"id":69029,"date":"2017-05-23T20:00:01","date_gmt":"2017-05-23T20:00:01","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/random-user-ids\/"},"modified":"2026-03-22T18:09:15","modified_gmt":"2026-03-22T18:09:15","slug":"random-user-ids","status":"publish","type":"plugin","link":"https:\/\/eu.wordpress.org\/plugins\/random-user-ids\/","author":10024063,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"20201115.1","stable_tag":"20201115.1","tested":"6.9.4","requires":"3.1","requires_php":"","requires_plugins":null,"header_name":"Random User IDs","header_author":"David Mar\u00edn Carre\u00f1o (DaveFX)","header_description":"Sets random user IDs for created users. Randomizes the user ID for the default user, if it exists.","assets_banners_color":"","last_updated":"2026-03-22 18:09:15","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/paypal.me\/davefx","header_plugin_uri":"https:\/\/davefx.com\/random-user-id","header_author_uri":"https:\/\/davefx.com","rating":4,"author_block_rating":0,"active_installs":300,"downloads":7448,"num_ratings":5,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["changelog","description"],"tags":{"20170521":{"tag":"20170521","author":"DaveFX","date":"2017-05-23 19:59:29"},"20170524":{"tag":"20170524","author":"DaveFX","date":"2017-05-24 03:14:41"},"20170526":{"tag":"20170526","author":"DaveFX","date":"2017-05-26 08:57:27"},"20170526.1":{"tag":"20170526.1","author":"DaveFX","date":"2017-07-20 17:26:27"},"20170720":{"tag":"20170720","author":"DaveFX","date":"2017-07-20 17:36:49"},"20190125":{"tag":"20190125","author":"DaveFX","date":"2019-11-28 12:57:02"},"20201115":{"tag":"20201115","author":"DaveFX","date":"2020-12-17 10:29:04"},"20201115.1":{"tag":"20201115.1","author":"DaveFX","date":"2026-03-22 18:09:15"}},"upgrade_notice":[],"ratings":{"1":1,"2":0,"3":0,"4":1,"5":3},"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":3489313,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":null,"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[600,141514],"plugin_category":[54],"plugin_contributors":[141515],"plugin_business_model":[],"class_list":["post-69029","plugin","type-plugin","status-publish","hentry","plugin_tags-security","plugin_tags-user-ids","plugin_category-security-and-spam-protection","plugin_contributors-davefx","plugin_committers-davefx"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/random-user-ids\/assets\/icon-256x256.png?rev=3489313","icon_2x":"https:\/\/ps.w.org\/random-user-ids\/assets\/icon-256x256.png?rev=3489313","generated":false},"screenshots":[],"raw_content":"<!--section=changelog-->\n<h4>20201115<\/h4>\n\n<ul>\n<li>Adding new filter dfx_random_user_id_min_id to customize the minimum allowed user ID number<\/li>\n<\/ul>\n\n<h4>20190125<\/h4>\n\n<ul>\n<li>Adding new filter dfx_random_user_id_max_id to customize the maximum allowed user ID number<\/li>\n<\/ul>\n\n<h4>20170720<\/h4>\n\n<ul>\n<li>Updating documentation to reflect changes incoming with WordPress version 4.9.<\/li>\n<\/ul>\n\n<h4>20170526<\/h4>\n\n<ul>\n<li>Now the maximum generated ID is Javascript's MAX_SAFE_INTEGER \/ 2, so we shouldn't generate problems with the Javascript layer.<\/li>\n<\/ul>\n\n<!--section=description-->\n<p>This WordPress plugin randomizes the user_id for the user created on WordPress setup, removing one potential attack factor from the site.<\/p>\n\n<h3>How it works<\/h3>\n\n<p>Once activated, the plugin will immediately replace the ID for the default admin user (with user ID 1). By default, the plugin will use random user IDs between 1 and 4503599627370495 (to ensure compatibility with Javascript code using the user ID).<\/p>\n\n<p>All newly created users from that moment will be generated with a random user ID in the defined range.<\/p>\n\n<h3>How to customize the range for new user IDs<\/h3>\n\n<p>You can customize the range used by the plugin for the random generated user IDs by using the WordPress filters dfx_random_user_id_max_id and dfx_random_user_id_min_id.<\/p>\n\n<p>For example, if you want to have all your user IDs between 1000 and 9999 you can add the following lines to your theme\u2019s functions.php file:<\/p>\n\n<pre><code>function set_dfx_max_user_id( $default_max_id ) {\n    return 9999;\n}\nadd_filter( 'dfx_random_user_id_max_id', 'set_dfx_max_user_id' );\n\nfunction set_dfx_min_user_id( $default_max_id ) {\n    return 1000;\n}\nadd_filter( 'dfx_random_user_id_min_id', 'set_dfx_min_user_id' );\n<\/code><\/pre>\n\n<p>Probably, you\u2019ll want to add these lines to your code before activating the plugin, so your new random main admin user ID is inside your desired range.<\/p>","raw_excerpt":"This WordPress plugin randomizes the user_id for the user created on WordPress setup, removing one potential attack factor from the site.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/69029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=69029"}],"author":[{"embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/davefx"}],"wp:attachment":[{"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=69029"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=69029"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=69029"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=69029"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=69029"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/eu.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=69029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}