function metaWeblog_getUsersBlogs($args)
 {
     global $DB;
     $out = array();
     list($appkey, $username, $password) = $args;
     $user = new user();
     $error = !$user->authenticate($username, $password);
     if (!empty($error) || $user->blocked == '1') {
         $out = new IXR_Error(401, "User not allowed.");
     } else {
         $websites_ids = $user->websites;
         if (empty($websites_ids)) {
             // get all websites
             $DB->query('SELECT id FROM nv_websites WHERE permission = 0');
             // only public websites
             $websites_ids = $DB->result();
         }
         if (is_array($websites_ids)) {
             foreach ($websites_ids as $wid) {
                 $website = new website();
                 $website->load($wid);
                 $out[] = array('blogid' => $website->id, 'url' => $website->absolute_path(true) . $website->homepage(), 'blogName' => $website->name, 'isAdmin' => false, 'xmlrpc' => $website->absolute_path(true) . '/xmlrpc');
             }
         }
     }
     return $out;
 }