本文整理汇总了PHP中Parse\ParseUser::setEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP ParseUser::setEmail方法的具体用法?PHP ParseUser::setEmail怎么用?PHP ParseUser::setEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Parse\ParseUser
的用法示例。
在下文中一共展示了ParseUser::setEmail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dtestUserSignUp
public function dtestUserSignUp()
{
$user = new ParseUser();
$user->setUsername("asdf");
$user->setPassword("zxcv");
$user->setEmail('m.skaik@gmail.com');
$user->signUp();
$this->assertTrue($user->isAuthenticated());
}
示例2: testUserAttributes
public function testUserAttributes()
{
$user = new ParseUser();
$user->setUsername('asdf');
$user->setPassword('zxcv');
$user->setEmail('asds@mail.com');
$this->assertEquals('asdf', $user->getUsername());
$this->assertEquals('asds@mail.com', $user->getEmail());
}
示例3: header
header("Location: index.php");
/* Redirect browser */
exit;
}
//Will remove any numbers, thus if it is all numbers the length will be 0
if (preg_match('/[a-zA-Z]/', $pass) == 0) {
setcookie("regError", "Password must contain letters");
header("Location: index.php");
/* Redirect browser */
exit;
}
/* set session storage */
ParseClient::setStorage(new ParseSessionStorage());
try {
$user->setUsername($_POST["username"]);
$user->setEmail($_POST["username"]);
$user->setPassword($_POST["password"]);
$user->set("friendlyName", $_POST["friendly"]);
$user->set("isAdmin", TRUE);
$user->signUp();
$_SESSION["username"] = ParseUser::getCurrentUser()->get("username");
$_SESSION["friendlyName"] = ParseUser::getCurrentUser()->get("friendlyName");
} catch (ParseException $ex) {
// error in $ex->getMessage();
setcookie("regError", $ex->getMessage());
}
} else {
setcookie("regError", "Username, Password, and Chat Name are required");
}
header("Location: index.php");
/* Redirect browser */