email_exists()判断邮箱地址是否已经被注册过

目录

描述

译文

该函数判断所给电子邮件地址($email)是否已被某一用户名注册,并返回用户编号(邮件地址不存在则返回false)。参见username_exists.

原文

This function will check whether or not a given email address ($email) has already been registered to a username, and returns that users ID (or false if none exists). See also username_exists.

This function is normally used when a user is registering, to ensure that the E-mail address the user is attempting to register with has not already been registered.

email_exists() 描述

用法

<?php
   
if( email_exists$email )) {
      
/* stuff to do when email address exists */
   
}
?>

email_exists() 用法

示例

If the E-mail exists, echo the ID number to which the E-mail is registered. Otherwise, tell the viewer that it does not exist.

email_exists() 示例

历史

添加于 版本: 2.1.0

email_exists() 历史

源文件

email_exists() 函数的代码位于 wp-includes/user.php

email_exists() 源文件

相关