From c80e6612e26340b7542e0ae010e208966dff8d59 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Tue, 3 May 2005 04:22:47 +0000 Subject: [PATCH] Bugfixes. --- src/lib/file.users.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/file.users.php b/src/lib/file.users.php index d874638..3e1c835 100644 --- a/src/lib/file.users.php +++ b/src/lib/file.users.php @@ -17,7 +17,7 @@ require_once 'lib/file.php'; */ 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); @@ -31,7 +31,7 @@ function file_users_get_all() */ 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); @@ -52,8 +52,7 @@ function file_users_get($user) */ 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; -- 2.43.0