From 82ed07baa14690611835b2e9becfb3330396c581 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 7 Feb 2013 18:53:51 -0800 Subject: provide a global way of enforcing name policy restrictions, but only enforce empty names or length > storage size. Allow plugins to set other policies. In particular, you can't have an empty channel name now, but one char is legal ;-) --- mod/settings.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index ea914cbac..d2dd57b18 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -429,10 +429,12 @@ function settings_post(&$a) { if($username != $channel['channel_name']) { $name_change = true; - if(mb_strlen($username) > 40) - $err .= t(' Please use a shorter name.'); - if(mb_strlen($username) < 3) - $err .= t(' Name too short.'); + require_once('include/identity.php'); + $err = validate_channelname($username); + if($err) { + notice($err); + return; + } } -- cgit v1.2.3