[Solved] How to attribute a number to each registered user
Please, how can I assign a number to each registered user in order of registration date?
I want to make a raffle and I need an order to know which user wins the prize.
I'm sorry, but wpForo doesn't have such a feature. You need to use some additional plugin for this purpose, or write a custom code like this:
Actually each user is automatically assigned a unique user id on registering and same will generally be consecutively numbered according to date and time of registration. You can see this in action if you go to Dashboard/Forums/Settings/Members/Member url structure and switch from nice name to user id. After changing that setting you will see their user id in the url. Instead of url/profile/elforo it would be url/profile/1 for example.
As a rule of thumb the last user id will be the same as the total members as stated in the forum statics bar. However, if you have at some point deleted members then the former will not be true. There is no handy sort fields in the Member directory so in this case you should login into phpmyadmin, click on the wpforo_profiles table and click the user id column and sort it so that the latest members are displayed first. So 1 to whatever that user id is will be your draw range.
Edit: Or, switch the url structure to "user_id", clear he WPforo caches, control+f5 on the main forum page and hover over "Our newest member" name in the forum statistics bar and that will show you the latest unique member number.
Thank you very much Sofy and VereK !!