Public Member Functions | |
authAdmin ($path) |
Definition at line 32 of file Rss.php.
authAdmin | ( | $ | path | ) |
Definition at line 34 of file Rss.php.
00035 { 00036 $session = Mage::getSingleton('rss/session'); 00037 if ($session->isAdminLoggedIn()) { 00038 return; 00039 } 00040 list($username, $password) = Mage::helper('core/http')->authValidate(); 00041 $adminSession = Mage::getModel('admin/session'); 00042 $user = $adminSession->login($username, $password); 00043 //$user = Mage::getModel('admin/user')->login($username, $password); 00044 if($user && $user->getId() && $user->getIsActive() == '1' && $adminSession->isAllowed($path)){ 00045 $session->setAdmin($user); 00046 } else { 00047 Mage::helper('core/http')->authFailed(); 00048 } 00049 }