summaryrefslogtreecommitdiff
path: root/includes/model/User_model.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model/User_model.php')
-rw-r--r--includes/model/User_model.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index 523685df..a69c288c 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -1,6 +1,14 @@
<?php
/**
+ * Strip unwanted characters from a users nick.
+ * @param string $nick
+ */
+function User_validate_Nick($nick) {
+ return preg_replace("/([^a-z0-9üöäß. _+*-]{1,})/ui", '', $nick);
+}
+
+/**
* Returns user by id.
*
* @param $id UID