Checks if an application password with the given name exists for this user.
Parameters
$user_id
intrequired- User ID.
$name
stringrequired- Application name.
Source
public static function application_name_exists_for_user( $user_id, $name ) {
$passwords = static::get_user_application_passwords( $user_id );
foreach ( $passwords as $password ) {
if ( strtolower( $password['name'] ) === strtolower( $name ) ) {
return true;
}
}
return false;
}
Changelog
Version | Description |
---|---|
5.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.