function privatemsg_load_folders in Privatemsg 5
Same name and namespace in other branches
- 5.3 privatemsg.module \privatemsg_load_folders()
Return an array of folders for a user.
3 calls to privatemsg_load_folders()
- privatemsg_list in ./
privatemsg.module - privatemsg_manage_folders in ./
privatemsg.module - Display the console that lets users manage their private message folders.
- privatemsg_view_form in ./
privatemsg.module - Add the action form to the view message screen.
File
- ./
privatemsg.module, line 2398
Code
function privatemsg_load_folders($uid) {
$folders = array();
foreach (_privatemsg_folder_map() as $fid => $name) {
$folders[] = array(
'fid' => $fid,
'name' => $name,
);
}
$result = db_query('SELECT fid, name FROM {privatemsg_folder} WHERE uid = %d', $uid);
while ($folder = db_fetch_array($result)) {
$folders[] = $folder;
}
return $folders;
}