00001 <?php
00002
00003
00004
00005 class HijackAccountEventSink implements IEventSink {
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 public function on_event($event_name, $event_params, &$result) {
00016 switch ($event_name) {
00017 case 'get_actions':
00018 $source = $event_params['source'];
00019 $contextes = array('view', 'list');
00020 if ($source instanceof DAOUsers && in_array($event_params['context'], $contextes)) {
00021 $result['hijack'] = tr('Hijack Account', 'hijackaccount');
00022 }
00023 break;
00024 case 'notifications_collect_sources':
00025 $result['usermanagement.hijackaccount'] = tr('usermanagement.hijackaccount', 'hijackaccount');
00026 break;
00027 case 'notifications_translate':
00028 if ($event_params == 'usermanagement.hijackaccount') {
00029 $result = tr('usermanagement.hijackaccount', 'hijackaccount');
00030 }
00031 break;
00032 }
00033 }
00034 }