1

What is the 'true' argument in session->getBeforeAuthUrl(true)?

I see some cases where it is

$session->getBeforeAuthUrl(true)

and some

$session->getBeforeAuthUrl()

What's the difference? Almost impossible to google for this question and I don't see any getters in the Customer/Model/Session.

4

$session->getBeforeAuthUrl(true) gives you the value for before_auth_url and deletes it from the session right after that. For reference see Mage_Core_Model_Session_Abstract_Varien::getData(). If you call the same method without true, you simply get the data value, but this will stay in the session for further use.

  • ah, so it's like a consume flag, nice. – Funkodebat Dec 3 '15 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.