I'm attempting to list out all the fields a user profile object would have into a tableselect. This will be displayed on the configuration screen of a module that I have been building. I have managed to make a tabelselect with checkboxes and dropdowns in it. That part I got down.
The part that I thought would be easy and ended up getting me stuck is getting an array of the fields a profile has. This would include any user made profile fields. Is there a simple way to get an array of the profile fields without needing to relate it to a user? The module would need this list on the front end for anonymous users so comparing it to the user would not work.
I don't need the values of any fields just the names and type of field maybe some settings like max and min. But will not need the value of any set user.