*/
function file_users_get_all()
{
- if (($f = fopen("data/admins.txt", 'r')) === false) return false;
+ if (($f = fopen("data/users.txt", 'r')) === false) return false;
$users = array();
while (!feof($f)) $users[] = fgetcsv($f, 4096);
fclose($f);
*/
function file_users_get($user)
{
- if (($f = fopen("data/admins.txt", 'r')) === false) return false;
+ if (($f = fopen("data/users.txt", 'r')) === false) return false;
while (!feof($f))
{
$u = fgetcsv($f, 4096);
*/
function file_users_add($user, $pass, $email)
{
- if (file_users_get($user)) return false; // Ya existe
- if (($f = fopen("data/admins.txt", 'a')) === false) return false; // error
+ if (($f = fopen("data/users.txt", 'a')) === false) return false; // error
fputcsv($f, array($user, $pass, $email));
fclose($f);
return true;