From f8f9ae40bcf4be901bb83577151ece130a34b322 Mon Sep 17 00:00:00 2001
From: Florian Azizian <florian.azizian@maarch.org>
Date: Tue, 27 Jan 2015 10:39:15 +0000
Subject: [PATCH] FIX #1899 Add warning message in user_id is in wrong format

---
 core/trunk/core/class/users_controler.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/core/trunk/core/class/users_controler.php b/core/trunk/core/class/users_controler.php
index c35a8536ffb..733735729ee 100644
--- a/core/trunk/core/class/users_controler.php
+++ b/core/trunk/core/class/users_controler.php
@@ -365,6 +365,11 @@ class users_controler extends ObjectControler implements ObjectControlerIF
     {
         $error = "";
         $f = new functions();
+
+        if (strpos($user->user_id, "'") !== false) {
+            $error .= _USER_ID . ' '._WRONG_FORMAT . '#';
+        }
+
         $user->user_id = $f->protect_string_db(
             $f->wash($user->user_id, 'no', _THE_ID, 'yes', 0, 128)
         );
-- 
GitLab