From d3f283a8d9f19ec4bf8aff64c8e6e98cc7030768 Mon Sep 17 00:00:00 2001 From: All-3kcis Date: Tue, 21 Jul 2015 11:43:23 +0200 Subject: [PATCH] Correct api_key and error "DB_ERROR_RECORD_ALREADY_EXISTS" --- htdocs/user/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 8963c9f4477..7f8a8610970 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -347,7 +347,7 @@ if ($action == 'update' && ! $_POST["cancel"]) $object->login = GETPOST("login",'alpha'); $object->gender = GETPOST("gender",'alpha'); $object->pass = GETPOST("password"); - $object->api_key = GETPOST("api_key"); + $object->api_key = (GETPOST("api_key", 'alpha'))?GETPOST("api_key", 'alpha'):$object->api_key; $object->admin = empty($user->admin)?0:GETPOST("admin"); // A user can only be set admin by an admin $object->office_phone=GETPOST("office_phone",'alpha'); $object->office_fax = GETPOST("office_fax",'alpha');