discuz ucenter的用戶註冊接口函數

<?php
include '/config/config_ucenter.php';
include "/uc_client/client.php";
if($_GET["act"]=='log'){
$uid = uc_user_register($_POST['username'], $_POST['password'], $_POST['email']);
	if($uid <= 0) {
		if($uid == -1) {
			echo '用戶名不合法';
		} elseif($uid == -2) {
			echo '包含要允許註冊的詞語';
		} elseif($uid == -3) {
			echo '用戶名已經存在';
		} elseif($uid == -4) {
			echo 'Email 格式有誤';
		} elseif($uid == -5) {
			echo 'Email 不允許註冊';
		} elseif($uid == -6) {
			echo '該 Email 已經被註冊';
		} else {
			echo '未定義';
		}
	} else {
		echo '註冊成功';
	}
}
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無標題文檔</title>
</head>

<body>
<form action="?act=log" method="post">
<input type="text" name="username" />
<input type="text" name="password" />
<input type="text" name="email" />
<input type="submit" value="submit" />
</form>
</body>
</html>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章