Index: user.php
===================================================================
--- user.php	(revision 6473)
+++ user.php	(working copy)
@@ -1,5 +1,22 @@
 <?php
+/**
+ * WordPress User API
+ *
+ * @package WordPress
+ */
 
+/**
+ * get_profile() - Retrieve user data based on field
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since 1.5
+ * @uses $wpdb WordPress database object to create queries. 
+ *
+ * @param string $field User field to retrieve
+ * @param string $user Optional. User username.
+ * @return string The value in the field
+ */
 function get_profile($field, $user = false) {
 	global $wpdb;
 	if ( !$user )
@@ -7,13 +24,33 @@
 	return $wpdb->get_var("SELECT $field FROM $wpdb->users WHERE user_login = '$user'");
 }
 
+/**
+ * get_usernumposts() - Number of posts user has written
+ *
+ * @since 0.71
+ * @uses $wpdb WordPress database object for queries
+ *
+ * @param int $userid User ID
+ * @return int Amount of posts user has written
+ */
 function get_usernumposts($userid) {
 	global $wpdb;
 	$userid = (int) $userid;
 	return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_type = 'post' AND " . get_private_posts_cap_sql('post'));
 }
 
-// TODO: xmlrpc only.  Maybe move to xmlrpc.php.
+/**
+ * user_pass_ok() - {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since 
+ * @todo xmlrpc only. Maybe move to xmlrpc.php.
+ *
+ * @param string $user_login {@internal Missing Description}}
+ * @param string $user_pass {@internal Missing Description}}
+ * @return unknown {@internal Missing Description}}
+ */
 function user_pass_ok($user_login,$user_pass) {
 	$userdata = get_userdatabylogin($user_login);
 	return wp_check_password($user_pass, $userdata->user_pass);
@@ -23,6 +60,18 @@
 // User option functions
 //
 
+/**
+ * get_user_option() - {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since 
+ * @uses $wpdb WordPress database object for queries
+ *
+ * @param string $option {@internal Missing Description}}
+ * @param unknown_type $user Optional. {@internal Missing Description}}
+ * @return unknown {@internal Missing Description}}
+ */
 function get_user_option( $option, $user = 0 ) {
 	global $wpdb;
 
@@ -39,6 +88,20 @@
 		return get_option( $option );
 }
 
+/**
+ * update_user_option - {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since 
+ * @uses $wpdb WordPress database object for queries
+ *
+ * @param int $user_id User ID
+ * @param string $option_name {@internal Missing Description}}
+ * @param mixed $newvalue {@internal Missing Description}}
+ * @param bool $global Whether option name is blog specific or not
+ * @return unknown
+ */
 function update_user_option( $user_id, $option_name, $newvalue, $global = false ) {
 	global $wpdb;
 	if ( !$global )
@@ -46,8 +109,18 @@
 	return update_usermeta( $user_id, $option_name, $newvalue );
 }
 
-// Get users with capabilities for the current blog.
-// For setups that use the multi-blog feature.
+/**
+ * get_users_of_blog() - Get users with capabilities for the current blog.
+ *
+ * For setups that use the multi-blog feature.
+ *
+ * @since 
+ * @uses $wpdb WordPress database object for queries
+ * @uses $blog_id The Blog id of the blog for those that use more than one blog
+ *
+ * @param int $id Blog ID
+ * @return object|array List of Users that are part of that Blog ID
+ */
 function get_users_of_blog( $id = '' ) {
 	global $wpdb, $blog_id;
 	if ( empty($id) )
@@ -60,6 +133,19 @@
 // User meta functions
 //
 
+/**
+ * delete_usermeta() - {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since 
+ * @uses $wpdb WordPress database object for queries
+ *
+ * @param int $user_id User ID
+ * @param string $meta_key {@internal Missing Description}}
+ * @param mixed $meta_value {@internal Missing Description}}
+ * @return bool True deletion completed and false if user_id is not a number.
+ */
 function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
 	global $wpdb;
 	if ( !is_numeric( $user_id ) )
@@ -80,6 +166,20 @@
 	return true;
 }
 
+/**
+ * get_usermeta() - {@internal Missing Short Description}}
+ *
+ * If $user_id is not a number, then the function will fail over
+ * with a 'false' boolean return value.
+ * {@internal Missing Long Description}}
+ *
+ * @since 
+ * @uses $wpdb WordPress database object for queries
+ *
+ * @param int $user_id User ID
+ * @param string $meta_key {@internal Missing Description}}
+ * @return false|string|array
+ */
 function get_usermeta( $user_id, $meta_key = '') {
 	global $wpdb;
 	$user_id = (int) $user_id;
@@ -110,13 +210,26 @@
 		return $values;
 }
 
+/**
+ * update_usermeta() - {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since 
+ * @uses $wpdb WordPress database object for queries
+ *
+ * @param int $user_id User ID
+ * @param string $meta_key
+ * @param mixed $meta_value
+ * @return unknown
+ */
 function update_usermeta( $user_id, $meta_key, $meta_value ) {
 	global $wpdb;
 	if ( !is_numeric( $user_id ) )
 		return false;
 	$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
 
-	// FIXME: usermeta data is assumed to be already escaped
+	/** @todo Might need fix because usermeta data is assumed to be already escaped */
 	if ( is_string($meta_value) )
 		$meta_value = stripslashes($meta_value);
 	$meta_value = maybe_serialize($meta_value);
@@ -146,7 +259,24 @@
 // Private helper functions
 //
 
-// Setup global user vars.  Used by set_current_user() for back compat.
+/**
+ * setup_userdata() - Setup global user vars.
+ *
+ * Used by set_current_user() for back compat. Might be deprecated
+ * in the future.
+ *
+ * @since 
+ * @global unknown $userdata
+ * @global string $user_login The user username for logging in
+ * @global int $user_level The level of the user
+ * @global int $user_ID The ID of the user
+ * @global string $user_email The email address of the user
+ * @global string $user_url The url in the user's profile
+ * @global string $user_pass_md5 MD5 of the user's password
+ * @global string $user_identity The display name of the user
+ *
+ * @param int $user_id Optional. User ID to setup data for
+ */
 function setup_userdata($user_id = '') {
 	global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity;
 
@@ -168,6 +298,17 @@
 	$user_identity	= $user->display_name;
 }
 
+/**
+ * wp_dropdown_users() - {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @since 
+ * @uses $wpdb WordPress database object for queries
+ *
+ * @param unknown_type $args
+ * @return unknown
+ */
 function wp_dropdown_users( $args = '' ) {
 	global $wpdb;
 	$defaults = array(
@@ -233,6 +374,17 @@
 	return $output;
 }
 
+/**
+ * _fill_user() - {@internal Missing Short Description}}
+ *
+ * {@internal Missing Long Description}}
+ *
+ * @access private
+ * @since 
+ * @uses $wpdb WordPress database object for queries
+ *
+ * @param object $user The user data object
+ */
 function _fill_user( &$user ) {
 	global $wpdb;
 
