コード例 #1
0
ファイル: unactivated.php プロジェクト: netbliss/ezpublish
    default:
        $limit = 10;
}
$unactivatedCount = eZUserAccountKey::count(eZUserAccountKey::definition());
$unactivated = array();
$availableSortFields = array('time' => 'time', 'login' => 'login', 'email' => 'email');
$availableSortOrders = array('asc' => 'asc', 'desc' => 'desc');
// default sort field/sort order
$SortField = 'time';
$SortOrder = 'asc';
if (isset($Params['SortField']) && $availableSortFields[$Params['SortField']]) {
    $SortField = $Params['SortField'];
}
if (isset($Params['SortOrder']) && $availableSortOrders[$Params['SortOrder']]) {
    $SortOrder = $Params['SortOrder'];
}
if ($unactivatedCount > 0) {
    $unactivated = eZUser::fetchUnactivated(array($SortField => $SortOrder), $limit, $Offset);
}
$tpl->setVariable('unactivated_count', $unactivatedCount);
$tpl->setVariable('unactivated_users', $unactivated);
$tpl->setVariable('sort_field', $SortField);
$tpl->setVariable('sort_order', $SortOrder);
$tpl->setVariable('limit_preference', $limitPreference);
$tpl->setVariable('number_of_items', $limit);
$tpl->setVariable('view_parameters', array('offset' => $Offset));
$tpl->setVariable('module', $Module);
$functions = $Module->attribute('functions');
$Result['path'] = array(array('text' => ezpI18n::tr('kernel/user', 'User'), 'url' => false), array('text' => ezpI18n::tr('kernel/user', 'Unactivated users'), 'url' => $functions['unactivated']['uri']));
$Result['content'] = $tpl->fetch('design:user/unactivated.tpl');
return $Result;