Customer SessionCustomer Session is Empty In Custom ModuleMagento creates two customer sessions with one...

初めてです, is '初めて' an adverb?

What is 6÷2×(1+2) =?

Roman Numerals equation 1

How to say "Brexit" in Latin?

What is the postion of Lord Shiva as per Srimad-Bhagavatam

Is a new Boolean field better than a null reference when a value can be meaningfully absent?

Is the set of language decidable by some Turing machine computing in some given computable time bound decidable

Which one of these password policies is more secure?

Replacement expressions

Can you tell from a blurry photo if focus was too close or too far?

Why did the villain in the first Men in Black movie care about Earth's Cockroaches?

Advice for a new journal editor

Why zero tolerance on nudity in space?

How to deal with an incendiary email that was recalled

A title for a history book

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Why has the mole been redefined for 2019?

Why is working on the same position for more than 15 years not a red flag?

How would an AI self awareness kill switch work?

How long is the D&D Starter Set campaign?

How much mayhem could I cause as a sentient fish?

Can a long polymer chain interact with itself via van der Waals forces?

Traveling through the asteriod belt?

Intern applicant asking for compensation equivalent to that of permanent employee



Customer Session


Customer Session is Empty In Custom ModuleMagento creates two customer sessions with one browser for the same guest?unable to get customer data from session in custom module?Customer is active even after session deletedStore session data as guest and get this data as logged in Customer in observerAdding Customer Attribute Value in customer informationUnable to get Customer Session Datahow to create customer session variable on first visit on store?Magento 2 + Customer logged out automatically in checkout processAcquire session of logged in customer in external script













2















I am using the magento customer session to store some data. I want it to be destroyed when customer logs out.



However (customer/session) still persisting the data.



One way is I can unset data on log out observer.But does it automatically clear all the customer session data when user log out.



What is the ideal way to achieve it?










share|improve this question
















bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    2















    I am using the magento customer session to store some data. I want it to be destroyed when customer logs out.



    However (customer/session) still persisting the data.



    One way is I can unset data on log out observer.But does it automatically clear all the customer session data when user log out.



    What is the ideal way to achieve it?










    share|improve this question
















    bumped to the homepage by Community 2 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      2












      2








      2








      I am using the magento customer session to store some data. I want it to be destroyed when customer logs out.



      However (customer/session) still persisting the data.



      One way is I can unset data on log out observer.But does it automatically clear all the customer session data when user log out.



      What is the ideal way to achieve it?










      share|improve this question
















      I am using the magento customer session to store some data. I want it to be destroyed when customer logs out.



      However (customer/session) still persisting the data.



      One way is I can unset data on log out observer.But does it automatically clear all the customer session data when user log out.



      What is the ideal way to achieve it?







      magento-1.9 customer session






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 14 '15 at 19:32









      Talesh

      501312




      501312










      asked Jan 26 '15 at 11:14









      KrishKrish

      163




      163





      bumped to the homepage by Community 2 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 2 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          These are your options, they do all the same, clearing all data on the session. But when the customer logs out, there is no way to retrieve the data, because the session is destroyed.



          $customerSession->unset()
          $customerSession->clear()
          $customerSession->unsetAll()


          Calling one of the methods on logout event customer_logout is a good idea.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "479"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f53343%2fcustomer-session%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            These are your options, they do all the same, clearing all data on the session. But when the customer logs out, there is no way to retrieve the data, because the session is destroyed.



            $customerSession->unset()
            $customerSession->clear()
            $customerSession->unsetAll()


            Calling one of the methods on logout event customer_logout is a good idea.






            share|improve this answer




























              0














              These are your options, they do all the same, clearing all data on the session. But when the customer logs out, there is no way to retrieve the data, because the session is destroyed.



              $customerSession->unset()
              $customerSession->clear()
              $customerSession->unsetAll()


              Calling one of the methods on logout event customer_logout is a good idea.






              share|improve this answer


























                0












                0








                0







                These are your options, they do all the same, clearing all data on the session. But when the customer logs out, there is no way to retrieve the data, because the session is destroyed.



                $customerSession->unset()
                $customerSession->clear()
                $customerSession->unsetAll()


                Calling one of the methods on logout event customer_logout is a good idea.






                share|improve this answer













                These are your options, they do all the same, clearing all data on the session. But when the customer logs out, there is no way to retrieve the data, because the session is destroyed.



                $customerSession->unset()
                $customerSession->clear()
                $customerSession->unsetAll()


                Calling one of the methods on logout event customer_logout is a good idea.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 4 '16 at 10:40









                Fabian BlechschmidtFabian Blechschmidt

                33.4k664173




                33.4k664173






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f53343%2fcustomer-session%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    “%fieldName is a required field.”, in Magento2 REST API Call for GET Method Type The Next...

                    How to change City field to a dropdown in Checkout step Magento 2Magento 2 : How to change UI field(s)...

                    變成蝙蝠會怎樣? 參考資料 外部連結 导航菜单Thomas Nagel, "What is it like to be a...