Skip to content

Commit cb61848

Browse files
author
Jason Smale
committed
Merge pull request #35 from AOEpeople/redirect-to-login-if-logged-out
Redirect to login page if trying to access tickets list in customer account while logged out
2 parents 7a2353d + 0528db8 commit cb61848

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/code/community/Zendesk/Zendesk/controllers/Customer/TicketsController.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
class Zendesk_Zendesk_Customer_TicketsController extends Mage_Core_Controller_Front_Action
1919
{
2020

21+
public function preDispatch()
22+
{
23+
parent::preDispatch();
24+
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
25+
$this->_redirectUrl(Mage::helper('customer')->getAccountUrl());
26+
}
27+
}
28+
2129
/**
2230
* Display data
2331
*/

0 commit comments

Comments
 (0)