本文整理汇总了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);
}