get_user_id_from_string()已过时的方法

目录

描述

Get a numeric user ID from either an email address or a login. If a number is sent to the function, that number is returned as the id.

get_user_id_from_string() 描述

用法

<?php get_user_id_from_string$string ); ?>

get_user_id_from_string() 用法

参数

$string

(string) (必填) String representation of the user to lookup the ID for. May be either the user's login (their username), or the email address registered in WordPress. A numeric string is considered to be an existing user ID and is simply returned as such.

默认值: None

get_user_id_from_string() 参数

返回值

(int

ID of the user specified by $string on success, null if no user is found.

get_user_id_from_string() 返回值

源文件

get_user_id_from_string() 函数的代码位于 wp-includes/ms-functions.php

get_user_id_from_string() 源文件