configuration value definition and management
-
Hi everyone,
I’m developing a site for a sport association and I need to assign to the registering users an ID that is provided by an external system.
Since I receive the IDs in ranges (ie. membership ID from 130 to 250) I can’t use the standard ID provided by WordPress.
Using some plugins and some code hack I managed almost to finish the setup as I was able to store the additional information (external ID) and to show the field in the standard administration page (so the admin can make manual adjustments).
However I would like to add a configuration value available to the administrator user to store the available range so that the assignement of the ID to the user can be attached to a standard hook requiring less work from the administration perspective.
I was also able to customize WP in order to automatically update the property with a random value after the registration using simple hacks that didn’t require a creation of a plugin.
To keep it simple I’d like to avoid the need of developing one.
Reading the documentation I learn how to add attributes for all user as user meta, however this specific configuration requires a single value in the database editable only by the administrators.
Checking the DB structure and looking at the codex I think altering the wp_options table would be my best option, but I’m not sure how to implementing without creating a plugin or how it would be affected by future update.
Could you please give me some suggestion on which is the best approach to achieve my goal?
Any help will be appreciated.
Thanks
- The topic ‘configuration value definition and management’ is closed to new replies.