aboutsummaryrefslogtreecommitdiffstats
path: root/doc/en/hook/validate_channelname.bb
blob: 2ab12bbec575d0de2868bd640e8b083e0b63f2d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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]