本文整理汇总了PHP中DBAccess::getUserByLoginName方法的典型用法代码示例。如果您正苦于以下问题:PHP DBAccess::getUserByLoginName方法的具体用法?PHP DBAccess::getUserByLoginName怎么用?PHP DBAccess::getUserByLoginName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBAccess
的用法示例。
在下文中一共展示了DBAccess::getUserByLoginName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: count
if (strlen($firstName) == 0) {
$errorTextFirst = "Please enter your first name.";
$errorStyleFirst = "background-color:#F99;";
$error = true;
}
if (strlen($lastName) == 0) {
$errorTextLast = "Please enter your last name.";
$errorStyleLast = "background-color:#F99;";
$error = true;
}
if (strlen($userName) == 0) {
$errorTextUserName = "Please select a username.";
$errorStyleUserName = "background-color:#F99;";
$error = true;
} else {
$result = DBAccess::getUserByLoginName($userName);
$rows = count($result, 0);
if ($rows > 0 && $result[0]['UserID'] != $targetUserID) {
$error = true;
$errorTextUserName = "Username is in use.";
$errorStyleUserName = "background-color:#F99;";
}
}
if (strlen($email) == 0) {
$errorTextEmail = "Please specify your email address.";
$errorStyleEmail = "background-color:#F99;";
$error = true;
} else {
$result = DBAccess::getUserByEmail($userName);
$rows = count($result, 0);
if ($rows > 0 && $result[0]['UserID'] != $targetUserID) {