最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Generate long hashed user ID

programmeradmin0浏览0评论

Can I replace the default user ID generation on registration to a more advanced one? Similar to SHA-256 et al ?

I'm working on prototyping a service with possibility of massive amounts of signups and for different reasons I'd like to replace the default function.

Can I replace the default user ID generation on registration to a more advanced one? Similar to SHA-256 et al ?

I'm working on prototyping a service with possibility of massive amounts of signups and for different reasons I'd like to replace the default function.

Share Improve this question edited Oct 9, 2019 at 12:20 butlerblog 5,1213 gold badges28 silver badges44 bronze badges asked Oct 9, 2019 at 9:25 JumbledJumbled 1
Add a comment  | 

1 Answer 1

Reset to default 2

The WordPress wp_users table uses an ID that is an auto-increment integer for unique user ID.

There is no way to change that without making significant changes to the way WordPress works, and even if you do that, you will break most plugins that depend on the integer value for user ID.

I don't see any benefit from using hashed value for the ID. IDs are unique in a single installation of WordPress. ID in the form of number is the best solution for MySQL queries, database tables indexing, and other things. All websites today use numerical IDs for users for those reasons.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论