PostNuke Help

Previous
pnThemeLoad

Home
up

Next
pnUserGetLang


pnUserGetAll

get basic information on all users

Synopsis

array pnUserGetAll();

Description

pnUserGetAll() obtains a set of basic information on all active users in the PostNuke system.

pnUserGetAll() is deprecated but still functional in this version of the PostNuke API. You shouldn't use it, since it'll be removed when PostNuke will reach the 1.0 version. Instead you are strongly encouraged to use the users module API getall function: $users = pnModAPIFunc('users', 'user', 'getall');

Return Values

This function returns an array of associative arrays. The array elements are referenced by UID for quick access to information on a specific user. Each array corresponds to a particular user, and has the following array members:

uname

The user name of the user

uid

The user ID of the user

name

The full name of this user

email

The email address of this user

url

The URL of this user

avatar

The avatar of this user

Notes

Only the uname and uid fields of each array are guaranteed to be populated; the other items may be empty.

Examples

// Get all users
$allusers = pnUserGetAll();
// Display username and uid for each user
foreach ($allusers as $user) {
        echo "User ID $user[uid] has user name $user[uname]\n";
}
// Display name for uid 5
echo "User ID 5 is called {$allusers[5]['name']}\n";
       

Previous
pnThemeLoad

Home
up

Next
pnUserGetLang