本文整理汇总了PHP中MEMBER::write方法的典型用法代码示例。如果您正苦于以下问题:PHP MEMBER::write方法的具体用法?PHP MEMBER::write怎么用?PHP MEMBER::write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MEMBER
的用法示例。
在下文中一共展示了MEMBER::write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postVar
// login/logout when required or renew cookies
if ($action == 'login') {
// Form Authentication
$login = postVar('login');
$pw = postVar('password');
$shared = intPostVar('shared');
// shared computer or not
$pw = substr($pw, 0, 40);
// avoid md5 collision by using a long key
if ($member->login($login, $pw)) {
$member->newCookieKey();
$member->setCookies($shared);
if ($CONF['secureCookieKey'] !== 'none') {
// secure cookie key
$member->setCookieKey(md5($member->getCookieKey() . $CONF['secureCookieKeyIP']));
$member->write();
}
// allows direct access to parts of the admin area after logging in
if ($nextaction) {
$action = $nextaction;
}
$manager->notify('LoginSuccess', array('member' => &$member, 'username' => $login));
$errormessage = '';
ACTIONLOG::add(INFO, "Login successful for {$login} (sharedpc={$shared})");
} else {
// errormessage for [%errordiv%]
$trimlogin = trim($login);
if (empty($trimlogin)) {
$errormessage = "Please enter a username.";
} else {
$errormessage = 'Login failed for ' . $login;