wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



set_current_user › WordPress Function

Da2.0.1
Deprecato3.0.0
set_current_user ( $id, $name = '' )
Parametri: (2)
  • (int|null) $id User ID.
    Richiesto:
  • (string) $name Optional. The user's username
    Richiesto: No
    Default: (vuoto)
Vedi:
Ritorna:
  • (WP_User) returns wp_set_current_user()
Definito a:
Codex:

Changes the current user by ID or name.

Set $id to null and specify a name if you do not know a user's ID.


Sorgenti

function set_current_user($id, $name = '') {
	_deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' );
	return wp_set_current_user($id, $name);
}