auth_cookie_malformed
Action HookDescription
Fires if an authentication cookie is malformed.Hook Information
File Location |
wp-includes/pluggable.php
View on GitHub
|
Hook Type | Action |
Line Number | 711 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$cookie
|
Malformed auth cookie. |
string
|
$scheme
|
Authentication scheme. Values include 'auth', 'secure_auth', or 'logged_in'. |
Usage Examples
Basic Usage
<?php
// Hook into auth_cookie_malformed
add_action('auth_cookie_malformed', 'my_custom_function', 10, 2);
function my_custom_function($cookie, $scheme) {
// Your custom code here
}
Source Code Context
wp-includes/pluggable.php:711
- How this hook is used in WordPress core
<?php
706 *
707 * @param string $cookie Malformed auth cookie.
708 * @param string $scheme Authentication scheme. Values include 'auth', 'secure_auth',
709 * or 'logged_in'.
710 */
711 do_action( 'auth_cookie_malformed', $cookie, $scheme );
712 return false;
713 }
714
715 $scheme = $cookie_elements['scheme'];
716 $username = $cookie_elements['username'];
PHP Documentation
<?php
/**
* Fires if an authentication cookie is malformed.
*
* @since 2.7.0
*
* @param string $cookie Malformed auth cookie.
* @param string $scheme Authentication scheme. Values include 'auth', 'secure_auth',
* or 'logged_in'.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-includes/pluggable.php
Related Hooks
Related hooks will be displayed here in future updates.