1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00
hubzilla_ynh/sources/.fr-bpZJnx/hubzilla-master/doc/hook/validate_channelname.bb

23 lines
534 B
BlitzBasic
Raw Normal View History

2016-06-22 19:56:29 +02:00
[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]