From c960584d92b06fb449d253ca3d2c76cbc2546371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= <eleazan@gmail.com> Date: Wed, 24 Sep 2014 11:49:15 +0200 Subject: [PATCH] Fix #1302. Fix issue that fails for get names on incorrect formats. Ex: J.Everybody --- include/class.user.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/class.user.php b/include/class.user.php index 5e2ee73b0..f660fccf9 100644 --- a/include/class.user.php +++ b/include/class.user.php @@ -697,6 +697,13 @@ class PersonsName { $r = explode(' ', $name); $size = count($r); + + //check if name is bad format (ex: J.Everybody), and fix them + if($size==1 && mb_strpos($r[0], '.') !== false) + { + $r = explode('.', $name); + $size = count($r); + } //check first for period, assume salutation if so if (mb_strpos($r[0], '.') === false) -- GitLab