wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



set_current_user › WordPress Function

Od2.0.1
Przestarzały3.0.0
set_current_user ( $id, $name = '' )
Parametry: (2)
  • (int|null) $id User ID.
    Wymagane: Tak
  • (string) $name Optional. The user's username
    Wymagane: Nie
    Domyślny: (puste)
Zobacz:
Powrót:
  • (WP_User) returns wp_set_current_user()
Zdefiniowane na:
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.


Źródło

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