Skip to Content Skip to Menu

Unique User Field

  • hanneslf
  • hanneslf
  • OFFLINE
  • Posts: 27
  • Thanks: 1
  • Karma: 0
11 years 1 week ago #236207 by hanneslf
Unique User Field was created by hanneslf
Hi,
Is it possible to have a CB User Profile Field where the it would be a number between say 1 and 10000. The user can choose this number BUT it cannot be the same as another user .i.e. All users will have a unique number.
Thanks.

Please Log in or Create an account to join the conversation.

  • danbo1972
  • danbo1972
  • OFFLINE
  • Posts: 88
  • Thanks: 22
  • Karma: 4
11 years 3 hours ago #236776 by danbo1972
Replied by danbo1972 on topic Unique User Field
I have something similar to this. My users have a 9 digit "token" that is assigned only to them. If they don't enter it correctly, they don't register. I used the help of our friend Kyle to set it up. You can see the thread here:
www.joomlapolis.com/forum/153-professional-member-support/223186-solved-qsecuredq-registration

Once you are done doing that part, log into phpmyadmin open the database you're working on and select the comprofiler table. Find the field that you want to use and select the "U" on the right. This will create a "unique" value for that field. If you already have multiple same entries you will get an error saying it wont work and why. Clear those entries and do it again.

I am experimenting with this myself. So far I have not had any adverse reactions from doing it. Just be sure to

:woohoo: ***** BACK UP YOUR DATABASE BEFORE YOU START!!! ***** or you will be :sick:

I get a error message now when I try to enter duplicate value so it's working. I just need to figure out how to edit the error because it's not that pretty when it happens.

Good luck.
The following user(s) said Thank You: hanneslf

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum