![]() |
What's the best place for storing reserved usernames in CodeIgniter? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: What's the best place for storing reserved usernames in CodeIgniter? (/showthread.php?tid=87854) |
What's the best place for storing reserved usernames in CodeIgniter? - MithiyVisur - 06-09-2023 I'm developing a website and want to implement a feature that prevents users from creating accounts with certain reserved usernames like "account," "index," "profile," and others. I have already compiled a list of these reserved usernames, but I'm unsure about the best place to store this data/array within CodeIgniter. As someone who is familiar with CodeIgniter, I prefer to adhere to its recommended structure and organization. However, I'm uncertain whether storing an array of reserved usernames in helpers, libraries, or configs is the appropriate approach. I don't want to deviate from best practices. I would greatly appreciate any suggestions on where to store this array within the CodeIgniter framework. Thank you in advance for your assistance! RE: What's the best place for storing reserved usernames in CodeIgniter? - InsiteFX - 06-10-2023 Save the names to the database, load them into an array then check to see if the name is in the array. This way you can always add more names and keep it up to date. |