本文整理匯總了PHP中sfGuardUser::getEmailAddress方法的典型用法代碼示例。如果您正苦於以下問題:PHP sfGuardUser::getEmailAddress方法的具體用法?PHP sfGuardUser::getEmailAddress怎麽用?PHP sfGuardUser::getEmailAddress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sfGuardUser
的用法示例。
在下文中一共展示了sfGuardUser::getEmailAddress方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: notifyNewPassword
/**
* Notify the user of the activated account.
*
* @param sfGuardUser $user
*/
private function notifyNewPassword(sfGuardUser $user, $password)
{
// $message = Swift_Message::newInstance()
// ->setFrom(sfConfig::get('app_sf_guard_plugin_default_from_email', 'from@noreply.com'))
// ->setTo($this->user->email_address)
// ->setSubject('New Password for '.$this->user->username)
// ->setBody($this->getPartial('sfGuardForgotPassword/new_password', array('user' => $this->user, 'password' => $request['sf_guard_user']['password'])))
// ;
//
// $this->getMailer()->send($message);
$vars = array('user' => $user, 'password' => $password);
$message_html = $this->getPartial('rtGuardForgotPassword/email_new_password_html', $vars);
$message_html = $this->getPartial('rtEmail/layout_html', array('content' => $message_html));
$message_plain = $this->getPartial('rtGuardForgotPassword/email_new_password_plain', $vars);
$message_plain = $this->getPartial('rtEmail/layout_plain', array('content' => html_entity_decode($message_plain)));
$message = Swift_Message::newInstance()->setFrom($this->getAdminEmail())->setTo($user->getEmailAddress())->setSubject('New Password for ' . $user->username)->setBody($message_html, 'text/html')->addPart($message_plain, 'text/plain');
$this->getMailer()->send($message);
}
示例2: mergeFacebookInfo
/**
* Merge a users data with that from Facebook, updating fields where
* appropriate
*
* @param array $facebookUserInfo
* @param sfGuardUser $user
* @return self
*/
public function mergeFacebookInfo(array $facebookUserInfo, sfGuardUser $user)
{
if (!$this->getUserSetName()) {
if (isset($facebookUserInfo['name']) && $this->getFullName() != $facebookUserInfo['name']) {
$this->setFullName($facebookUserInfo['name']);
}
if (isset($facebookUserInfo['first_name']) && $user->getFirstName() != $facebookUserInfo['first_name']) {
$user->setFirstName($facebookUserInfo['first_name']);
}
if (isset($facebookUserInfo['last_name']) && $user->getLastName() != $facebookUserInfo['last_name']) {
$user->setLastName($facebookUserInfo['last_name']);
}
}
if (!$this->getUserSetEmailAddress()) {
$email = isset($facebookUserInfo['email']) ? $facebookUserInfo['email'] : '';
if (sfConfig::get('app_facebook_dont_store_proxy_emails', false)) {
if (sfFacebookGraph::checkProxyEmail($email)) {
$email = '';
}
}
if ($email != $user->getEmailAddress()) {
$user->setEmailAddress($email);
}
}
return $this;
}
開發者ID:passkey1510,項目名稱:sfFacebookGraphPlugin,代碼行數:34,代碼來源:PluginsfFacebookGraphUserProfile.class.php
示例3: generateVerificationToken
public function generateVerificationToken(sfGuardUser $user)
{
$this->setVerificationToken(MicroId::generate('mailto:' . $user->getEmailAddress(), $this->getDomain()));
}
示例4: notifyUser
/**
* Notify the user of the activated account.
*
* @param sfGuardUser $user
*/
protected function notifyUser(sfGuardUser $user, $password = null)
{
$vars = array('user' => $user);
if (isset($password)) {
$vars['password'] = $password;
}
$message_html = $this->getPartial('rtGuardRegister/email_registration_success_html', $vars);
$message_html = $this->getPartial('rtEmail/layout_html', array('content' => $message_html));
$message_plain = $this->getPartial('rtGuardRegister/email_registration_success_plain', $vars);
$message_plain = $this->getPartial('rtEmail/layout_plain', array('content' => html_entity_decode($message_plain)));
$message = Swift_Message::newInstance()->setFrom($this->getAdminEmail())->setTo($user->getEmailAddress())->setSubject('Registration confirmed!')->setBody($message_html, 'text/html')->addPart($message_plain, 'text/plain');
$this->getMailer()->send($message);
}