function linkit_user_linkit_load_plugins in Linkit 6
Same name and namespace in other branches
- 7 plugins/linkit_user/linkit_user.module \linkit_user_linkit_load_plugins()
Implementation of hook_linkit_load_plugins().
File
- plugins/
linkit_user/ linkit_user.module, line 11 - Extend Linkit with user links.
Code
function linkit_user_linkit_load_plugins($string) {
$matches = array();
// Get users
$result = db_query("SELECT u.uid, u.name FROM {users} u WHERE LOWER(u.name) LIKE LOWER('%%%s%%') AND u.status = 1", $string);
while ($user = db_fetch_object($result)) {
$matches['user'][] = array(
'title' => $user->name,
'path' => 'internal:user/' . $user->uid,
'information' => array(
'type' => 'User',
),
);
}
return $matches;
}