예제 #1
0
/**
 * Add profile search page handler
 *
 * @return string data;
 */
function profile_search_handler($hook, $type, $return, $params)
{
    $Pagination = new OssnPagination();
    $users = new OssnUser();
    $data = $users->searchUsers($params['q']);
    $Pagination->setItem($data);
    $user['users'] = $Pagination->getItem();
    $search = ossn_plugin_view('output/users', $user);
    $search .= $Pagination->pagination();
    if (empty($data)) {
        return ossn_print('ossn:search:no:result');
    }
    return $search;
}
function profile_search_handler($hook, $type, $return, $params)
{
    $Pagination = new OssnPagination();
    $users = new OssnUser();
    $data = $users->searchUsers($params['q']);
    $Pagination->setItem($data);
    $user['users'] = $Pagination->getItem();
    $search = ossn_view('system/templates/users', $user);
    $search .= $Pagination->pagination();
    if (empty($data)) {
        return 'No result found';
    }
    return $search;
}