本文整理汇总了PHP中account::setUsername方法的典型用法代码示例。如果您正苦于以下问题:PHP account::setUsername方法的具体用法?PHP account::setUsername怎么用?PHP account::setUsername使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类account
的用法示例。
在下文中一共展示了account::setUsername方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createdAction
/**
* @Route("/created")
* @Route("/created/")
*/
public function createdAction($getUsername, $getPassword, $getEmail)
{
$account = new account();
$account->setUsername($getUsername);
$account->setPassword(strtoupper(sha1($getUsername . ":" . $getPassword)));
$account->setEmail($getEmail);
$em = $this->getDoctrine()->getManager();
$em->persist($account);
$em->flush();
return $this->render('twitter/success_created.html.twig', array('getUsername' => $getUsername, 'getEmail' => $getEmail, 'current_year' => date("Y")));
}
示例2: isset
$email = isset($_POST['email']) ? $_POST['email'] : '';
$username = helper::clearText($username);
$username = helper::escapeText($username);
$fullname = helper::clearText($fullname);
$fullname = helper::escapeText($fullname);
$location = helper::clearText($location);
$location = helper::escapeText($location);
$balance = helper::clearInt($balance);
$fb_page = helper::clearText($fb_page);
$fb_page = helper::escapeText($fb_page);
$instagram_page = helper::clearText($instagram_page);
$instagram_page = helper::escapeText($instagram_page);
$email = helper::clearText($email);
$email = helper::escapeText($email);
if ($authToken === helper::getAuthenticityToken()) {
$account->setUsername($username);
$account->setFullname($fullname);
$account->setLocation($location);
$account->setBalance($balance);
$account->setFacebookPage($fb_page);
$account->setInstagramPage($instagram_page);
$account->setEmail($email);
}
}
header("Location: /admin/profile.php/?id=" . $accountInfo['id']);
exit;
}
}
} else {
header("Location: /admin/main.php");
}