Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No login events in CP Log #11

Open
diemer opened this issue Oct 31, 2011 · 0 comments
Open

No login events in CP Log #11

diemer opened this issue Oct 31, 2011 · 0 comments

Comments

@diemer
Copy link

diemer commented Oct 31, 2011

I noticed this extension isn't calling the logger function, and my Control Panel log was full of only log out events so I patched this in the login_authenticate_start function, after the $this->sync_user_details($result); line.

$query = $this->EE->db->query("SELECT member_id FROM exp_members WHERE username ='".$this->EE->db->escape_str($result['username'])."' LIMIT 0, 1");

if ($query->num_rows() > 0)
{
    foreach($query->result_array() as $row)
    {
        $this->EE->session->userdata['member_id'] = $row['member_id'];
        $this->EE->session->userdata['username'] = $this->EE->db->escape_str($result['username']);
    }
}


$this->EE->load->library('logger');
$this->EE->logger->log_action("Logged in via LDAP");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant