Changeset 32884
- Timestamp:
- 06/20/2015 02:52:47 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r32874 r32884 1806 1806 * Insert a user into the database. 1807 1807 * 1808 * Most of the $userdata array fields have filters associated with the values.1809 * The exceptions are 'rich_editing', 'role', 'jabber', 'aim', 'yim',1810 * 'user_registered', and ' ID'. The filters have the prefix 'pre_user_' followed1811 * by the field name. An example using 'description' would have the filter1812 * ca lled, 'pre_user_description' that can be hooked into.1808 * Most of the `$userdata` array fields have filters associated with the values. Exceptions are 1809 * 'ID', 'rich_editing', 'comment_shortcuts', 'admin_color', 'use_ssl', 1810 * 'user_registered', and 'role'. The filters have the prefix 'pre_user_' followed by the field 1811 * name. An example using 'description' would have the filter called, 'pre_user_description' that 1812 * can be hooked into. 1813 1813 * 1814 1814 * @since 2.0.0 1815 * @since 3.6.0 The `aim`, `jabber`, and `yim` fields were removed as default user contact 1816 * methods for new installs. See wp_get_user_contact_methods(). 1815 1817 * 1816 1818 * @global wpdb $wpdb WordPress database object for queries. 1817 1819 * 1818 * @param array $userdata {1820 * @param array|object|WP_User $userdata { 1819 1821 * An array, object, or WP_User object of user data arguments. 1820 1822 * 1821 * @type int $ID User ID. If supplied, the user will be updated. 1822 * @type string $user_pass The plain-text user password. 1823 * @type string $user_login The user's login username. 1824 * @type string $user_nicename The URL-friendly user name. 1825 * @type string $user_url The user URL. 1826 * @type string $user_email The user email address. 1827 * @type string $display_name The user's display name. 1828 * Default is the the user's username. 1829 * @type string $nickname The user's nickname. Default 1830 * Default is the the user's username. 1831 * @type string $first_name The user's first name. For new users, will be used 1832 * to build $display_name if unspecified. 1833 * @type stirng $last_name The user's last name. For new users, will be used 1834 * to build $display_name if unspecified. 1835 * @type string|bool $rich_editing Whether to enable the rich-editor for the user. False 1836 * if not empty. 1837 * @type string $user_registered Date the user registered. Format is 'Y-m-d H:i:s'. 1838 * @type string $role User's role. 1839 * @type string $jabber User's Jabber account username. 1840 * @type string $aim User's AIM account username. 1841 * @type string $yim User's Yahoo! messenger username. 1823 * @type int $ID User ID. If supplied, the user will be updated. 1824 * @type string $user_pass The plain-text user password. 1825 * @type string $user_login The user's login username. 1826 * @type string $user_nicename The URL-friendly user name. 1827 * @type string $user_url The user URL. 1828 * @type string $user_email The user email address. 1829 * @type string $display_name The user's display name. 1830 * Default is the the user's username. 1831 * @type string $nickname The user's nickname. 1832 * Default is the the user's username. 1833 * @type string $first_name The user's first name. For new users, will be used 1834 * to build the first part of the user's display name 1835 * if `$display_name` is not specified. 1836 * @type string $last_name The user's last name. For new users, will be used 1837 * to build the second part of the user's display name 1838 * if `$display_name` is not specified. 1839 * @type string $description The user's biographical description. 1840 * @type string|bool $rich_editing Whether to enable the rich-editor for the user. 1841 * False if not empty. 1842 * @type string|bool $comment_shortcuts Whether to enable comment moderation keyboard 1843 * shortcuts for the user. Default false. 1844 * @type string $admin_color Admin color scheme for the user. Default 'fresh'. 1845 * @type bool $use_ssl Whether the user should always access the admin over 1846 * https. Default false. 1847 * @type string $user_registered Date the user registered. Format is 'Y-m-d H:i:s'. 1848 * @type string|bool $show_admin_bar_front Whether to display the Admin Bar for the user on the 1849 * site's frontend. Default true. 1850 * @type string $role User's role. 1842 1851 * } 1843 1852 * @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not
Note: See TracChangeset
for help on using the changeset viewer.