Title: Creating a unique code for each user
Last modified: August 30, 2016

---

# Creating a unique code for each user

 *  [mattltm](https://wordpress.org/support/users/mattltm/)
 * (@mattltm)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/creating-a-unique-code-for-each-user/)
 * I want to create a unique code that is attached to each user account. It needs
   to be 10 character long and should contain a mix of uppercase letters and numbers.
 * The code should be generated as soon as the user has registered and linked to
   their account.
 * I guess I could hash the wordpress generated userid and their email address to
   get a unique code but where would I put this code and how can I put it into the
   database with the users account?

The topic ‘Creating a unique code for each user’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [mattltm](https://wordpress.org/support/users/mattltm/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/creating-a-unique-code-for-each-user/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
