wp_setcookie ( $username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false )

  • (string) username The user's username
  • (string) password Optional. The user's password
  • (bool) already_md5 Optional. Whether the password has already been through MD5
  • (string) home Optional. Will be used instead of COOKIEPATH if set
  • (string) siteurl Optional. Will be used instead of SITECOOKIEPATH if set
  • (bool) remember Optional. Remember that the user is logged in
Defined at:


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

Related Functions

wp_set_auth_cookie, wp_clearcookie, wp_parse_auth_cookie, wp_set_comment_cookies, wp_get_cookie_login

Top Google Results

User discussions

wpseek mobile