wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
update_user_status is deprecated since version 5.3.0!
Alternative: wp_update_user()
Alternative: wp_update_user()
update_user_status › WordPress Function
Seit3.0.0
Veraltet5.3.0
› update_user_status ( $id, $pref, $value, $deprecated = null )
Parameter: (4) |
|
Siehe: | |
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Update the status of a user in the database.
Previously used in core to mark a user as spam or "ham" (not spam) in Multisite.Ähnliche Funktionen: update_user_meta, update_usermeta, update_blog_status, update_user_caches, update_user_option
Quellcode
function update_user_status( $id, $pref, $value, $deprecated = null ) { global $wpdb; _deprecated_function( __FUNCTION__, '5.3.0', 'wp_update_user()' ); if ( null !== $deprecated ) { _deprecated_argument( __FUNCTION__, '3.0.2' ); } $wpdb->update( $wpdb->users, array( sanitize_key( $pref ) => $value ), array( 'ID' => $id ) ); $user = new WP_User( $id ); clean_user_cache( $user ); if ( 'spam' === $pref ) { if ( $value == 1 ) { /** This filter is documented in wp-includes/user.php */ do_action( 'make_spam_user', $id ); } else { /** This filter is documented in wp-includes/user.php */ do_action( 'make_ham_user', $id ); } } return $value; }