From d8fe94d24be71a5abc54e348783558dfaf07c4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=EF=BF=BD=EF=BF=BD?= Date: Fri, 21 Nov 2014 17:49:59 +0000 Subject: [PATCH] transmit the piwik api error message back to the user --- bureau/class/m_piwik.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bureau/class/m_piwik.php b/bureau/class/m_piwik.php index 47c996ca..0d3ec976 100644 --- a/bureau/class/m_piwik.php +++ b/bureau/class/m_piwik.php @@ -112,6 +112,10 @@ class m_piwik { $user_creation_date = $user->date_registered; return $db->query("INSERT INTO piwik_users (uid, login, created_date) VALUES ('$cuid', '$user_login', '$user_creation_date')"); } + else { + $err->raise('piwik', $api_data->message); + return FALSE; + } } else { // api_data = false -> error is already filled return FALSE; }