Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Listener for LogOut Event does not work correctly #508

Closed
Portugao opened this Issue Sep 26, 2012 · 21 comments

Comments

Projects
None yet
2 participants

The record of the relevant user is not available.

@ghost

ghost commented Sep 26, 2012

Can you give some more detail of what you expect to see, what you get and what you are doing.

I try to get the subject of event
and than the uid:

public static function succeeded(Zikula_Event $event)
{
    $user = $event->getSubject();
    $uid = $user['uid'];

}

That work's in LogIn Listener and not here....

@ghost ghost closed this in 6240f86 Sep 26, 2012

@ghost

ghost commented Sep 26, 2012

Should be fixed now since build 31 - http://ci.zikula.org/job/Zikula_Core-1.3.4/31/

Oh, that sounds great. I will try as soon as possible..
thx a lot

@ghost

ghost commented Sep 26, 2012

You are most welcome.

Sorry.
This issue seems not to be solved.

@ghost

ghost commented Oct 20, 2012

Can you please be more specific as to what is wrong with the current build?
What exactly is not working? What do you expect to happen? And instead,
what actually happens?

Like I discribed 24 days ago.

@ghost

ghost commented Oct 20, 2012

Sorry, but I need to train you in how to give a bug report. I need to know

  1. What you expect
  2. What you are getting

Because as far as I can see at the moment, reading the diff, it's doing exactly what is documented. Until I can clearly understand your point of view and what problem you are experiencing, I can't help further.

I have this class with a method:

class MUBoard_Listener_UserLogout
{
    /**
     * Listener for the `module.users.ui.logout.succeeded` event.
     *
     * Occurs right after a successful logout.
     * All handlers are notified.
     * The event's subject contains the user's user record.
     */
    public static function succeeded(Zikula_Event $event)
    {
        $user = $event->getSubject();
        $uid = $user['uid'];

        MUBoard_Util_View::actualUser($uid);

    }
}

I wish to have the user id of the just logged out user to use in the Util_View method.

But the var $uid does not contain the user id of the user.

@ghost

ghost commented Oct 20, 2012

Can you var_dump($event);die;die; in your listener and see what you are getting?

Many lines like this:

object(Zikula_Event)#167 (7) { ["name":protected]=> string(32) "module.users.ui.logout.succeeded" ["subject":protected]=> NULL ["args":protected]=> array(2) { ["authentication_method"]=> NULL ["uid"]=> NULL }

@ghost ghost reopened this Oct 20, 2012

So the milestone should be changed to 1.3.5.

@ghost

ghost commented Oct 20, 2012

I'm re-opening on your feedback, but I still don't understand what the problem is (looking at the code). It should work. Can you place a var_dump($uid, $userObj);die;die; just after UserUtil.php - line 1385

@Portugao Portugao referenced this issue in Portugao/Board Oct 20, 2012

Closed

Saving user does not work by logout #2

I will do tomorrow.

I get:

string(1) "2" NULL

What does it mean what I get? Is there a bug in core or not?

Contributor

phaidon commented Aug 7, 2013

@Portugao Does this bug still exists?

Portugao commented Aug 7, 2013

I checked and it seems the issue is gone and could be closed!

Contributor

phaidon commented Aug 7, 2013

Great.

@phaidon phaidon closed this Aug 7, 2013

Portugao commented Aug 7, 2013

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment