Creating a uniqd id for users upload folder name |
(03-04-2017, 08:57 PM)PaulD Wrote: When I create a user table, I assign a 'code' string to the user so I can refer to them in urls, something like users/view_profile/jfghdskjih so I would use that string (which is unique for each user and never changing) as the folder name. FYI, get_instance()->security->get_random_bytes() binds you to the framework. You can replace that with random_bytes() - native on PHP 7+ or via a compat package on older versions: https://github.com/paragonie/random_compat When available, CI_Security::get_random_bytes() will just proxy to that function anyways. |
Messages In This Thread |
Creating a uniqd id for users upload folder name - by wolfgang1983 - 03-04-2017, 08:12 PM
RE: Creating a uniqd id for users upload folder name - by PaulD - 03-04-2017, 08:57 PM
RE: Creating a uniqd id for users upload folder name - by Narf - 03-06-2017, 02:06 AM
RE: Creating a uniqd id for users upload folder name - by InsiteFX - 03-06-2017, 06:05 AM
|