wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_setcookie › WordPress Function

Seit1.5.0
Veraltet2.5.0
wp_setcookie ( $username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false )
Parameter: (6)
  • (string) $username The user's username
    Erforderlich: Ja
  • (string) $password Optional. The user's password
    Erforderlich: Nein
    Standard: (leer)
  • (bool) $already_md5 Optional. Whether the password has already been through MD5
    Erforderlich: Nein
    Standard: false
  • (string) $home Optional. Will be used instead of COOKIEPATH if set
    Erforderlich: Nein
    Standard: (leer)
  • (string) $siteurl Optional. Will be used instead of SITECOOKIEPATH if set
    Erforderlich: Nein
    Standard: (leer)
  • (bool) $remember Optional. Remember that the user is logged in
    Erforderlich: Nein
    Standard: false
Siehe:
Definiert in:
Codex:

Sets a cookie for a user who just logged in. This function is deprecated.



Quellcode

function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
	_deprecated_function( __FUNCTION__, '2.5.0', 'wp_set_auth_cookie()' );
	$user = get_user_by('login', $username);
	wp_set_auth_cookie($user->ID, $remember);
}