Fixes vim mode line.
[platal.git] / classes / pluser.php
index d0e7e64..e5baf6c 100644 (file)
@@ -367,7 +367,7 @@ abstract class PlUser implements PlUserInterface
                     $list[$i] = $login;
                 }
             }
-            return $list;
+            return array_unique($list);
         }
         return null;
     }
@@ -403,7 +403,7 @@ abstract class PlUser implements PlUserInterface
 
     private static function stripBadChars($text)
     {
-        return str_replace(array(' ', "'"), array('-', ''),
+        return str_replace(array(' ', "'", '+'), array('-', '', '_'),
                            strtolower(stripslashes(replace_accent(trim($text)))));
     }
 
@@ -454,5 +454,5 @@ abstract class PlUser implements PlUserInterface
     }
 }
 
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
 ?>