aboutsummaryrefslogtreecommitdiff
path: root/documentation/examples/events/advanced.php
blob: c6fc2d0fbcf0f409b519f01b11ce9131f22e0781 (plain)
1
2
3
4
5
6
7
8
9
10
<?php

register_elgg_event_handler('create', 'object', 'example_event_handler');

function example_event_handler($event, $type, $params) {
	// Don't allow any non-admin users to create objects
	// Returning false from this function will halt the creation of the object.
	return isadminloggedin();
}