本文整理匯總了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 */