Advertisement
Guest User

Untitled

a guest
Jan 26th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.82 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * UserController
  5. *
  6. * @uses Controller responsible for most if not all of the front
  7. * facing use
  8. */
  9. class UserController extends Esolist_Controller_Action
  10. {
  11. protected $_redirectOnAclFail = 'user/dashboard';
  12. protected $_ignoreActions = array(
  13. 'dashboard',
  14. 'video-tutorials',
  15. 'my-account',
  16. 'login',
  17. 'logout',
  18. 'forgot-password',
  19. 'shout',
  20. 'noie6',
  21. 'canceled-account',
  22. 'cancel-account'
  23. );
  24.  
  25. /**
  26. * UserController::init()
  27. *
  28. * @return void
  29. */
  30. public function init()
  31. {
  32. parent::init(true);
  33. $this->_helper->layout->setLayout('layout');
  34. if( !isset($this->_user->user_has_setup) ){
  35. //Rad_Misc_Redirect::InternalGo('wizard', 2, 'user-setup');
  36. }
  37.  
  38. $actionName = $this->getRequest()->getActionName();
  39.  
  40. // CHeck if the action exists
  41. $actionFunc = $this->getFrontController()
  42. ->getDispatcher()
  43. ->formatActionName($actionName);
  44.  
  45. // ACL checks
  46. $this->view->pageType = $actionName;
  47. if (!in_array($actionName, $this->_ignoreActions)
  48. && method_exists($this, $actionFunc))
  49. {
  50. if (!$this->_user->can('viewAppPage_' . $actionName))
  51. {
  52. $this->getRequest()->setActionName('upsell');
  53. }
  54. }
  55.  
  56. // Possible fix for signup error?
  57. if($this->_user instanceof Esolist_User)
  58. {
  59. $this->view->current_user = $this->_user;
  60. // Check if they haven't paid their bills
  61. if($this->_user->isInNonPayment()
  62. && ($actionName !== 'logout' && $actionName !== 'login'))
  63. {
  64. $this->_redirect('billing/canceled-account/?nonPayment=true'); die;
  65. $this->getRequest()->setActionName('my-account');
  66. }
  67. }
  68. }
  69.  
  70. public function upsellAction()
  71. {
  72. // Do nothing
  73. }
  74.  
  75. /**
  76. * AgentBrokerController::dashboardAction()
  77. * @uses Responsible for generation of the user "Dashboard"
  78. * which contains all important quick reference data
  79. */
  80. public function dashboardAction()
  81. {
  82. $this->_helper->layout->setLayout('user/shout/layout');
  83. //die('THIS IS A TEST');
  84. //echo $this->_user->user_level; die;
  85. $this->view->isDashboard = true;
  86. $this->view->title = 'Dashboard';
  87. $social = new Application_Model_Social;
  88. $reports = new Application_Model_Reports;
  89.  
  90. // Grab our latest report and recent listings
  91. $this->view->latest_report = $reports->getLatestReport($this->_user->getGUID());
  92. if($this->view->latest_report instanceof Esolist_Report)
  93. {
  94. $this->view->next_report = $this->view->latest_report->time_created + Rad_Misc_Date::MONTH;
  95. }
  96.  
  97. $this->view->recent_listings = $this->models->listings
  98. ->fetchListings($this->_user->getGUID(), 0, 0, 0, 0, 5);
  99. // Our latest top networks
  100. $this->view->syndication_networks = $this->models->syndication->getTopNetworks($this->_user->getGUID());
  101. $this->view->latest_status = $social->getLatest($this->_user->getGUID());
  102. $this->view->all_listings = $this->_user->getListings(null, null);
  103. $this->view->all_listings_count = is_array($this->view->all_listings) ? count($this->view->all_listings) : 0;
  104. if( is_object($this->view->latest_status) )
  105. {
  106. $this->view->latest_status = $this->view->latest_status->message;
  107. }
  108.  
  109. // Now pick out the latest status updated
  110. // from the first social network
  111.  
  112. if( is_array($this->social_networks) && count($this->social_networks) > 0 )
  113. {
  114. //$this->view->shout_statuses = $this->_getEntities('social_status', null, $this->_user->getGUID(), null, 0, 5, false, 'asc');
  115. $this->view->shout_statuses = Rad_Entities_Functions_Entity::getEntities('social_status', null,
  116. $this->_user->getGUID(), null, 0, 5, false);
  117. //Zend_Debug::dump($this->view->shout_statuses); die;
  118. }
  119.  
  120. // Pass social network data
  121. if(isset($this->_user->social_statistics))
  122. {
  123. $this->view->social_statistics = $this->_user->social_statistics->convert();
  124. }
  125.  
  126.  
  127. // Change the view script if they're a basic-type account
  128. if($this->_user->is('basic_agent'))
  129. {
  130. $this->renderScript('user/dashboard/basic.phtml');
  131. }
  132.  
  133. }
  134.  
  135. /**
  136. * AgentBrokerController::listingsAction()
  137. * @uses Retrieve all listings belonging to the user and display
  138. * through the view
  139. */
  140. public function listingsAction()
  141. {
  142. // Array of "types" that we allow the user to sort by
  143. $types = array(
  144. 'active' => 0,
  145. 'enabled' => 'yes',
  146. 'archived' => 0,
  147. 'queued' => 0,
  148. 'draft' => 0
  149. );
  150.  
  151. // Set up proper pagination
  152. $page = 1;
  153. $row = null;
  154. if( count(($pagination = explode('/', ltrim($this->_getParam('page'), '/')))) > 0 )
  155. {
  156. $page = $pagination[0];
  157. if( isset($pagination[1]) )
  158. {
  159. $row = $pagination[1];
  160. }
  161. }
  162.  
  163. $this->view->title = 'Listings';
  164.  
  165. // Check whether we're handling archived listings or not
  166. $type = $this->_getParam('type');
  167.  
  168. // Build conditionals by which we're going to
  169. // fetch our listings
  170. $conditions = array(
  171. 'e.owner_guid' => $this->_user->getGUID()
  172. );
  173.  
  174. // Now set the proper type to true
  175. if (isset($types[$type])) {
  176. $types[$type] = 1;
  177. }
  178.  
  179. array_shift($types);
  180. foreach ($types as $type => $value) {
  181. $conditions[$type] = $value;
  182. }
  183.  
  184. // Retrieve pertinent listing data
  185. $paginator = $this->models->listings->getPaginator($conditions, 'e.time_updated desc');
  186. $propertyCount = $paginator->getTotalItemCount();
  187. $properties = $paginator->getAdapter()->getAllItems();
  188.  
  189. // What sort of listing selections can we allow?
  190. $allowedTypes = array(
  191. 'active' => $this->_translate('active'),
  192. 'archived' => $this->_translate('archived'),
  193. /*'queued' => $this->_translate('queued'),*/
  194. 'draft' => $this->_translate('draft'),
  195. );
  196.  
  197. if($this->_user->is('basic_agent'))
  198. {
  199. unset($allowedTypes['archived']);
  200. }
  201.  
  202. $this->view->allowed_types = $allowedTypes;
  203. $this->view->listings_select = $properties;
  204. $this->view->listing_select_count = $propertyCount;
  205. $this->view->type = $this->_getParam('type', 'active');
  206. $this->view->page = $page;
  207. $this->view->row = $row;
  208. $this->view->listings = $paginator;
  209. }
  210.  
  211. /**
  212. * AgentBrokerController::shoutAction()
  213. * @uses The shout page where a specific listing is gotten
  214. * or the very latest listing and displaed
  215. */
  216. public function shoutAction()
  217. {
  218. // Are we handling a specific listing
  219. // or letting the system handle the data?
  220. if( $this->_hasParam('listing') )
  221. {
  222. // Retrieve our listing and set the ddata
  223. $guid = $this->_getParam('listing');
  224. $listing = $this->_getEntity($guid);
  225.  
  226. if( $this->_user->can('read_listing', 0, $listing) )
  227. {
  228. $this->view->listing = $listing;
  229. }
  230. }else{
  231. // Grab our very latest listing
  232. $listing = $this->_user->getListings(0,1);
  233. if( is_array($listing) )
  234. {
  235. $this->view->listing = current($listing);
  236. }
  237. }
  238.  
  239. $this->view->all_listings = $this->_user->getListings(null, null);
  240. $this->view->all_listings_count = is_array($this->view->all_listings) ? count($this->view->all_listings) : 0;
  241. $this->view->social_networks_list = Esolist_Social::getSocialNetworks();
  242. $this->_helper->layout->setLayout('user/shout/layout');
  243.  
  244. if(isset($this->_user->social_network_to_load))
  245. {
  246. $this->view->network_to_load = $this->_user->social_network_to_load;
  247. }elseif(isset($this->view->social_networks) && count($this->view->social_networks)){
  248. $this->view->network_to_load = $this->view->social_networks[0]->getGUID();
  249. }
  250. }
  251.  
  252. /**
  253. * AgentBrokerController::spreadAction()
  254. * @uses Fetch data such as leads and visits
  255. * according to lisiting
  256. */
  257. public function spreadAction()
  258. {
  259. $this->view->title = 'Spread';
  260. $this->view->listings = $this->_user->getListings(null, null);
  261. $this->view->syndications = Zend_Registry::get('syndication');
  262. }
  263.  
  264. /**
  265. * AgentBrokerController::meterAction()
  266. * @uses Display "meter" data
  267. */
  268. public function meterAction()
  269. {
  270. $this->view->title = 'Meter';
  271.  
  272. /**
  273. * The below is the data neccesary to break down all the visits
  274. */
  275. $meterModel = new Application_Model_Meter;
  276. $seriesData = $meterModel->getVisitBreakdown($this->_user->getGUID());
  277. $listings = $this->_user->getListings(null, null);
  278.  
  279. // Calculate the total amount of visits and leads for the entire group
  280. $totalVisits = 0;
  281. $totalLeads = 0;
  282. foreach($seriesData as $domain => $item)
  283. {
  284. foreach($item as $k => $datum)
  285. {
  286. $totalVisits += $data['visits'];
  287. $totalLeads += $data['leads'];
  288. }
  289. }
  290.  
  291. /**
  292. * We will now attempt to collect twitter data for visualization
  293. */
  294. try{
  295. // Make sure this fucker has a twitter account
  296. if($this->_user->hasNetwork('twitter'))
  297. {
  298. // Collect the twitter objects
  299. $twitterAccounts = $this->_user->getChildObjects('social_network', 'twitter', null, null);
  300. if($twitterAccounts)
  301. {
  302. // Grab the first one and collect data
  303. $twitterAccounts[0]->activateApi();
  304. $api = $twitterAccounts[0]->getApi();
  305. $data = $api->account->verifyCredentials();
  306. $data = Rad_Misc_Array::fromXml($data->getIterator()->asXml());
  307. $this->view->twitter_data = array(
  308. 'followers_count' => $data['followers_count'],
  309. 'following_count' => $data['friends_count'],
  310. 'status_count' => $data['statuses_count'],
  311. 'favourites_count' => $data['favourites_count']
  312. );
  313. }
  314. }else{
  315.  
  316. // Data fillll :D
  317. $twitterAccounts = array_map(array($this, '_getEntity'), array(1942, 3819));
  318. $twitter = $this->_getEntity(1942);
  319. $twitter->activateApi();
  320. $api = $twitter->getApi();
  321. $data = $api->account->verifyCredentials();
  322. $data = Rad_Misc_Array::fromXml($data->getIterator()->asXml());
  323. $this->view->twitter_data = array(
  324. 'followers_count' => $data['followers_count'],
  325. 'following_count' => $data['friends_count'],
  326. 'status_count' => $data['statuses_count'],
  327. 'favourites_count' => $data['favourites_count']
  328. );
  329.  
  330. $twitterAccountsNorm = array();
  331. foreach($twitterAccounts as $account)
  332. {
  333. $twitterAccountsNorm[$account->getGUID()] = $account->getUsername();
  334. }
  335.  
  336. $this->view->twitterAccounts = $twitterAccountsNorm;
  337. }
  338. }catch(Zend_Http_Client_Adapter_Exception $e){
  339.  
  340. }
  341.  
  342. $this->view->to_date = Rad_Misc_Format::Date(time());
  343. $this->view->from_date = Rad_Misc_Format::Date(strtotime(date('m/1/Y')));
  344. $this->view->total_visits = $totalVisits;
  345. $this->view->total_leads = $totalLeads;
  346. $this->view->listings = $listings;
  347. $this->view->chart = $seriesData;
  348.  
  349. }
  350.  
  351. /**
  352. * AgentBrokerController::reportsAction()
  353. * @uses Generate reports overviewing all listings
  354. */
  355. public function reportsAction()
  356. {
  357. $guid = $this->_getParam('guid');
  358.  
  359. /**
  360. * Magical voodoo
  361. */
  362. if($guid)
  363. {
  364. $report = $this->_getEntity($guid);
  365. $reportXML = simplexml_load_file($report->getFilenameOnDisk());
  366.  
  367. $MAX_INT = 9999999999999;
  368. $dates = array();
  369. $edgeDates = array('from' => $MAX_INT, 'to' => 0);
  370. $networkData = array();
  371. $totalNetworkData = array();
  372. $unStackedNetworkData = array();
  373. $wantedNetworks = Zend_Registry::get('wanted_networks');
  374. foreach($reportXML->networks->network as $network)
  375. {
  376. $network = (array)$network;
  377. $networkDate = strtotime($network['month'] . '/' . $network['day'] . '/' . $network['year']);
  378. $edgeDates['from'] = $edgeDates['from'] > $networkDate ? $networkDate : $edgeDates['from'];
  379. $edgeDates['to'] = $edgeDates['to'] < $networkDate ? $networkDate : $edgeDates['to'];
  380. $leadsTotal += $network['leads'];
  381. $visitsTotal += $network['visits'];
  382. if(in_array($network['domain'], $wantedNetworks))
  383. {
  384. $networkData[$network['domain']]['domain'] = $network['domain'];
  385. $networkData[$network['domain']]['leads'] += $network['leads'];
  386. $networkData[$network['domain']]['visits'] += $network['visits'];
  387. $networkData[$network['domain']]['lead_percentage'] += (float)$network['lead_percentage'];
  388. $networkData[$network['domain']]['visit_percentage'] += (float)$network['visit_percentage'];
  389. }else{
  390. $networkData['other']['domain'] = 'other';
  391. $networkData['other']['leads'] += $network['leads'];
  392. $networkData['other']['visits'] += $network['visits'];
  393. $networkData['other']['lead_percentage'] += (float)$network['lead_percentage'];
  394. $networkData['other']['visit_percentage'] += (float)$network['visit_percentage'];
  395. }
  396.  
  397. $totalNetworkData[$network['domain']]['domain'] = $network['domain'];
  398. $totalNetworkData[$network['domain']]['leads'] += $network['leads'];
  399. $totalNetworkData[$network['domain']]['visits'] += $network['visits'];
  400. $totalNetworkData[$network['domain']]['lead_percentage'] += (float)$network['lead_percentage'];
  401. $totalNetworkData[$network['domain']]['visit_percentage'] += (float)$network['visit_percentage'];
  402. $unStackedNetworkData[] = $network;
  403. }
  404. }
  405.  
  406. if(isset($report->from_date) && isset($report->to_date))
  407. {
  408. $this->view->report_from_date = Rad_Misc_Format::Date($report->from_date->convert());
  409. $this->view->report_to_date = Rad_Misc_Format::Date($report->to_date->convert());
  410. }
  411.  
  412. $request = $this->getRequest();
  413. $this->view->chart_dates = range($edgeDates['from'], $edgeDates['to'], Rad_Misc_Date::DAY);
  414. $this->view->report = isset($report) ? $report : null;
  415. $this->view->report_xml = isset($reportXML) && $reportXML instanceof SimpleXMLElement ? $reportXML : null;
  416. $this->view->total_leads = $leadsTotal;
  417. $this->view->total_visits = $visitsTotal;
  418. $this->view->unstacked_data = $unStackedNetworkData;
  419. $this->view->network_data = $networkData;
  420. $this->view->other_data = $othersData;
  421. $this->view->total_data = $totalNetworkData;
  422. $this->view->from_date = $request->getQuery('from');
  423. $this->view->to_date = $request->getQuery('to');
  424. $this->view->listing = $request->getQuery('listing');
  425. $this->view->listings = $this->_user->getListings(null, null);
  426. $this->view->reports = $this->_user->getChildObjects('file', 'report', null, null);
  427. }
  428.  
  429. public function leadsAction()
  430. {
  431.  
  432. $defaultSearchTerm = $this->_translate('enter-email-or-name');
  433.  
  434. // Get all our parameters together for searching
  435. $fromDate = $this->_getParam('from_date', null);
  436. $toDate = $this->_getParam('to_date', null);
  437. $searchTerm = $this->_getParam('search_term', null);
  438. $guid = $this->_getParam('guid', null);
  439. $page = $this->_getParam('page', 1);
  440. $row = $this->_getParam('row', null);
  441.  
  442. if($searchTerm == $defaultSearchTerm) {
  443. $searchTerm = null;
  444. }
  445.  
  446. if(($fromDate == $toDate) && !is_null($fromDate)) {
  447. // Look ahead 23 hours and 49
  448. $toDate += Rad_Misc_Date::DAY - 1;
  449. }
  450.  
  451. $leadModel = new Application_Model_Leads;
  452.  
  453. // Set up our paginator
  454. $leads = $leadModel->getPaginator($this->_user->getGUID(), $searchTerm, $guid, $fromDate, $toDate);
  455. $leads->setItemCountPerPage(10);
  456. $leads->setCurrentPageNumber($page);
  457.  
  458. // Get all our listings
  459. $listings = $this->_user->getListings(null, null);
  460.  
  461. $this->view->listings = $listings;
  462. $this->view->leads = $leads;
  463. $this->view->from_date = $fromDate;
  464. $this->view->to_date = $toDate;
  465. $this->view->listing_guid = $guid;
  466. $this->view->date_range_used = false;
  467.  
  468.  
  469. if( !is_null($fromDate) && !is_null($toDate) )
  470. {
  471. $this->view->date_range_used = true;
  472. }
  473.  
  474. // Construct pagination prefix
  475. // to mantain the integrity of our search if one
  476. // was made
  477. $paginationPrefix = '';
  478. $paginationPrefixArray = array(
  479. 'from_date' => $fromDate,
  480. 'to_date' => $toDate,
  481. 'search_term' => $searchTerm,
  482. 'guid' => $guid,
  483. 'row' => $row
  484. );
  485.  
  486. foreach( $paginationPrefixArray as $key => $potentialPrefix )
  487. {
  488. if( !empty($potentialPrefix) )
  489. {
  490. $paginationPrefix .= $key . '/' . $potentialPrefix . '/';
  491. }
  492. }
  493.  
  494. if( empty($searchTerm) )
  495. {
  496. $this->view->search_term = $this->_translate('enter-email-or-name');
  497. }else{
  498. $this->view->search_term = $searchTerm;
  499. }
  500.  
  501. $this->view->pagination_prefix = 'leads/' . $paginationPrefix . 'page/';
  502.  
  503. // Process CSV download request
  504. if( $this->_request->getQuery('csv') == true )
  505. {
  506. $this->_helper->layout->disableLayout();
  507. $this->_helper->viewRenderer->setNoRender(true);
  508. // Get all leads
  509. $allLeads = $leads->getAdapter()->getAllItems();
  510. $leadArray = array(
  511. array('Date', 'Name', 'Email', 'Phone', 'Listing name', 'Listing Address', 'Type', 'Date of Showing')
  512. );
  513.  
  514. foreach( $allLeads as $lead )
  515. {
  516. $leadArray[] = array(Rad_Misc_Format::Date($lead->time_created), $lead->name,
  517. $lead->email, $lead->phone, $lead->getListing()->name,
  518. $lead->getListing()->street, $lead->ltype, $lead->scheduled_show);
  519. }
  520. $this->_helper->file->sendData(Rad_Misc_Array::toDsv($leadArray), Rad_Misc_File::getMimeType('csv'), $this->_user->getGUID() . '-' . time() . '.csv');
  521. }
  522. }
  523.  
  524. public function videoTutorialsAction()
  525. {
  526.  
  527. }
  528.  
  529. /**
  530. * UserController::myAccountAction()
  531. *
  532. * @return void
  533. */
  534. public function myAccountAction()
  535. {
  536. //Zend_Debug::dump($this->_user->subscription_id); die;
  537. $userLevelsModel = new Application_Model_UserLevels;
  538. $userLevels = $userLevelsModel->fetchAll('visible = 1');
  539. $errors = array();
  540.  
  541. // Adjust plans
  542. if($this->_request->isPost())
  543. {
  544. $post = $this->_getAllParams();
  545.  
  546. // First check if we have a billing entity set
  547. if(! isset($this->_user->billing_information_guid))
  548. {
  549. $billingInfo = new Esolist_Billing_PaymentInformation;
  550. }else{
  551. $billingInfo = $this->_getEntity($this->_user->billing_information_guid->convert());
  552. }
  553.  
  554. $billingInfo->address = $post['billing-address'];
  555. $billingInfo->city = $post['billing-city'];
  556. $billingInfo->state = $post['billing-state'];
  557. $billingInfo->name_on_card = $post['billing-name_on_card'];
  558. $billingInfo->zip = $post['billing-zip'];
  559. $billingInfo->expiration = $post['cc_month'] . $post['cc_year'];
  560. $billingInfo->save();
  561. }
  562.  
  563. reset($userLevels);
  564. if(isset($this->_user->user_level))
  565. {
  566. $uLevel = $this->_user->user_level->convert();
  567. foreach($userLevels as $userLevel)
  568. {
  569. if($uLevel == $userLevel->id) {
  570. $this->view->user_level = $userLevel;
  571. break;
  572. }
  573. }
  574. }
  575.  
  576. // Empty object
  577. $billingInformation = new StdClass;
  578. if(isset($this->_user->billing_information_guid))
  579. {
  580. $billingInformation = $this->_getEntity($this->_user->billing_information_guid);
  581. }
  582.  
  583. $lastPayment = null;
  584. $nextPayment = null;
  585. if(isset($this->_user->last_payment))
  586. {
  587. $lastPayment = $this->_user->last_payment->convert();
  588. }
  589.  
  590. if(isset($this->_user->next_payment))
  591. {
  592. $nextPayment = $this->_user->next_payment->convert();
  593. }
  594.  
  595. $this->view->pageType = 'myAccount';
  596. $this->view->user_levels = $userLevels;
  597. $this->view->last_payment = $lastPayment;
  598. $this->view->next_payment = $nextPayment;
  599. $this->view->billingInformation = $billingInformation;
  600.  
  601. }
  602.  
  603. /**
  604. * UserController::loginAction()
  605. *
  606. * @return void
  607. */
  608. public function loginAction()
  609. {
  610. $this->_helper->layout->setLayout('user/lifp_layout');
  611. if( $this->_request->isPost() )
  612. {
  613. $post = $this->_request->getPost();
  614. $user = $this->models->users->emailExists($post['email']);
  615. if( $user instanceof Esolist_User )
  616. {
  617. $auth = Rad_Auth::getInstance();
  618. $post['remember_me'] = isset($post['remember_me']) ? $post['remember_me'] : false;
  619. $validationContainer = new Rad_Auth_Adapter_UserEntity($user, $post['password'], $post['remember_me']);
  620. $result = $auth->authenticate($validationContainer);
  621. if($result->isValid())
  622. {
  623. $this->_redirect($user->getPrimaryAppInstance()->getUrl());
  624. }else{
  625. $this->view->error = 'bad-password';
  626. }
  627. }else{
  628. $this->view->error = 'bad-username';
  629. }
  630. }
  631. }
  632.  
  633. /**
  634. * UserController::logoutAction()
  635. *
  636. * @return void
  637. */
  638. public function logoutAction()
  639. {
  640. if(Rad_Auth::getInstance()->hasIdentity())
  641. {
  642. Rad_Auth::getInstance()->clearIdentity();
  643. }
  644.  
  645. Rad_Misc_Redirect::InternalGo('user/login', 2, 'login'); die;
  646. }
  647.  
  648. /**
  649. * UserController::forgotPasswordAction()
  650. *
  651. * @return void
  652. */
  653. public function forgotPasswordAction()
  654. {
  655. $this->_helper->layout->setLayout('user/lifp_layout');
  656.  
  657. $this->view->emailed = false;
  658. if($this->_request->isPost())
  659. {
  660. $user = $this->models->users->emailExists($this->_getParam('email'));
  661. if($user instanceof Esolist_User)
  662. {
  663. $newPassword = Rad_Misc_Character::random(6);
  664. $user->password = $newPassword;
  665. $user->save();
  666.  
  667. $this->view->emailed = true;
  668.  
  669. Esolist_Mail_Notification::forgotPassword(array(
  670. 'to' => array(
  671. 'name' => $user->name,
  672. 'email' => $user->email
  673. ),
  674. 'data' => array(
  675. 'new_password' => $newPassword,
  676. 'user' => $user
  677. )
  678. ));
  679. }else{
  680. $this->view->error = 'no-user-found';
  681. }
  682. }
  683. }
  684.  
  685. /**
  686. * UserController::noie6Action()
  687. *
  688. * @return void
  689. */
  690. public function noie6Action()
  691. {
  692. $this->view->title = 'IE is a false prophet.';
  693. }
  694. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement