aboutsummaryrefslogtreecommitdiffstats
path: root/doc/hook/validate_channelname.bb
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-10 07:36:51 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-10 07:36:51 +0100
commitb782c46e518afd0713f92fabb76aea9a7c3e5d77 (patch)
treec28dc5d4f45988a01c56876d1ae41d92a73d6191 /doc/hook/validate_channelname.bb
parenteaa47760bc7bb024b4c41bd41be62fd16f1237ec (diff)
parent7ec687988746e1037d86d25186c2dd5f2addb15b (diff)
downloadvolse-hubzilla-b782c46e518afd0713f92fabb76aea9a7c3e5d77.tar.gz
volse-hubzilla-b782c46e518afd0713f92fabb76aea9a7c3e5d77.tar.bz2
volse-hubzilla-b782c46e518afd0713f92fabb76aea9a7c3e5d77.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'doc/hook/validate_channelname.bb')
-rw-r--r--doc/hook/validate_channelname.bb22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/hook/validate_channelname.bb b/doc/hook/validate_channelname.bb
index c78961017..2ab12bbec 100644
--- a/doc/hook/validate_channelname.bb
+++ b/doc/hook/validate_channelname.bb
@@ -1 +1,23 @@
[h2]validate_channelname[/h2]
+
+Called when creating a new channel or changing the channel name in mod/settings.php
+
+Hook data consists of an array
+
+ array(
+ 'name' => supplied name
+ );
+
+ If the hook handler determines the name is valid, do nothing. If there is an issue with the name,
+ set $hook_data['message'] to the message text which should be displayed to the member - and the name will
+ not be accepted.
+
+
+ Example:
+ [code]
+ if(mb_strlen($hook_data['name']) < 3)
+ $hook_data['message'] = t('Name too short.');
+ [/code]
+
+
+ \ No newline at end of file