I do not know English well. I use translate.google.pl Hello. I need some changes in PHP-Fusion 9.10 Access to the site will only be for logged in users, ie "Maintenance mode:" (I think I can handle it).
but I need::: [bcolor=#3300ff]>[/bcolor] After registration, each user will receive a unique five-digit number. e.g. 37859, cannot repeat. Each user will have his own [bcolor=#3300ff]>[/bcolor] This number will be displayed after logging in in the side panel. It will not be displayed for all users but for several user groups. [bcolor=#3300ff]>[/bcolor] Each user will have a unique five-digit number [bcolor=#3300ff]>[/bcolor] This number will be assigned to you (you will have this number) but if you are a regular user it will not be displayed to you [bcolor=#3300ff]>[/bcolor] If admin adds you to the "xyz" group, you will see this number [bcolor=#3300ff]>[/bcolor] After entering the home page (a user who is not registered), the website will ask for a five-digit number. [bcolor=#3300ff]>[/bcolor] After entering the number, the user will be redirected to the page with the information of the user to whom the number is assigned
Example::: * My five-digit number is 86420 You enter the website: http://dt.info.pl/ * A table will appear on the page in which you will have to enter a five-digit number. that is: 86420 * After entering the number, it redirects to the page with information about the user to whom the number is assigned: http://dt.info.pl/account.php?ref=4 4 is my profile ID This is the same: http://dt.info.pl/profile.php?lookup=4
You can make a userfield to display the random number in the panel, but restrict it to specific usergroups. This can be done in the panel or in the code for the user field.
Fill the user field with a random number at registration. This can be done via trigger in the database.
That's the problem, with 5 digit numbers there is a chance they are not unique. You could use the ID of the user, this is unique but easy to guess. You can set the startvalue of the id to e.g. 10000 to get a 5 digit number, but if e.g. I am number 10006, there is probably also number 10005 etc.
maybe better to use is UUD-short, but gives longer numbers
* After entering the number, it redirects to the page with information about the user to whom the number is assigned
If my number is 86420 and you enter it in the table information from my profile will be displayed :::: http://dt.info.pl/account.php?ref=4 http://dt.info.pl/profile.php?lookup=4
this is "account.php? ref = 4" and this is "profile.php? lookup = 4" this is the same file ... do you understand?
So now I have a couple of options to choose from... 1. UUD-short. 2. UNIX timestamp at registration time. 3. Recently I thought about using a "hash" function for user_id. E.g.: In this case, I would use the "CRC32" algorithm If my user_id = 1 is: CRC32 hash for "1" is "6c300461"
Now I have to add another column in the database (next to user_id) to store this "unique number".
I have 3 questions: 1. What is the chance that the value "6c300461" will repeat itself? 2. Which option would you choose? 3. In what files and what to add or change in them, so that during registration and when adding a user in the administration panel, this number is saved in the database?
Need help?, Having trouble? • View our Documentation for Guides, Standards and Functions • Name and Organize your Topics and Content correctly in the corresponding Forums for best support results • Attaching Log Files and Screenshots when reporting issues will help • Provide with an URL to live example if one exists • Please read the How to Report an Error post • Please read and comply with the Code of Conduct
Need help?, Having trouble? • View our Documentation for Guides, Standards and Functions • Name and Organize your Topics and Content correctly in the corresponding Forums for best support results • Attaching Log Files and Screenshots when reporting issues will help • Provide with an URL to live example if one exists • Please read the How to Report an Error post • Please read and comply with the Code of Conduct