本文整理汇总了PHP中UserListFactory::getByHomeEmailOrWorkEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP UserListFactory::getByHomeEmailOrWorkEmail方法的具体用法?PHP UserListFactory::getByHomeEmailOrWorkEmail怎么用?PHP UserListFactory::getByHomeEmailOrWorkEmail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserListFactory
的用法示例。
在下文中一共展示了UserListFactory::getByHomeEmailOrWorkEmail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: UserListFactory
$ulf = new UserListFactory();
$ulf->getByPasswordResetKey($key);
if ($ulf->getRecordCount() == 1) {
Debug::Text('FOUND Password reset key! ', __FILE__, __LINE__, __METHOD__, 10);
$user_obj = $ulf->getCurrent();
$user_name = $user_obj->getUserName();
} else {
Debug::Text('DID NOT FIND Password reset key! ', __FILE__, __LINE__, __METHOD__, 10);
$action = 'reset_password';
}
break;
case 'reset_password':
//Debug::setVerbosity( 11 );
Debug::Text('Email: ' . $email, __FILE__, __LINE__, __METHOD__, 10);
$ulf = new UserListFactory();
$ulf->getByHomeEmailOrWorkEmail($email);
if ($ulf->getRecordCount() == 1) {
$user_obj = $ulf->getCurrent();
$user_obj->sendPasswordResetEmail();
Debug::Text('Found USER! ', __FILE__, __LINE__, __METHOD__, 10);
Redirect::Page(URLBuilder::getURL(array('email_sent' => 1, 'email' => $email), 'ForgotPassword.php'));
} else {
//Error
Debug::Text('DID NOT FIND USER! ', __FILE__, __LINE__, __METHOD__, 10);
$validator->isTrue('email', FALSE, 'Email address was not found in our database');
}
/*
$validator->isTrue('user_name',FALSE, 'User Name or Password is incorrect');
*/
break;
default: