Might also be good to include the fixed IE JS file in that, Scotty (the fix that made it so it only executes when it’s needed).
« MODx Parse Error »MODx encountered the following error while attempting to parse the requested resource: « PHP Parse Error » PHP error debug Error: imagepng(): Unable to open '/hsphere/local/home/symphoni/symphonicheaven.com/assets/snippets/webloginpe/userimages/wilhelm.png' for writing Error type/ Nr.: Warning - 2 File: /hsphere/local/home/symphoni/symphonicheaven.com/assets/snippets/webloginpe/webloginpe.class.php Line: 2588 Line 2588 source: imagepng($image_p, $userImageFilePath, 0); Parser timing MySQL: 0.0287 s (29 Requests) PHP: 0.6018 s Total: 0.6305 s
function Logout($type, $loHomeId = '')
{
$this->Type = $type;
$this->loHomeId = $loHomeId;
$this->OnBeforeWebLogout;
$this->StatusToOffline();
$this->SessionHandler('destroy');
$this->OnWebLogout;
if ($type !== 'taconite')
{
$this->LogoutHomePage();
}
} function Logout($type, $loHomeId = '')
{
$this->Type = $type;
$this->loHomeId = $loHomeId;
$this->OnBeforeWebLogout();
$this->OnWebLogout();
$this->StatusToOffline();
$this->SessionHandler('destroy');
if ($type !== 'taconite')
{
$this->LogoutHomePage();
}
} function OnWebLogin()
{
global $modx;
$parameters = array('user' => $this->User);
$modx->invokeEvent('OnWebLogin', $parameters);
} function OnWebLogin()
{
global $modx;
$parameters = array(
'username' => $this->Username,
'user' => $this->User
);
$modx->invokeEvent('OnWebLogin', $parameters);
if (!empty($this->Report))
{
return; //There was an error in the last step
}
}
When logging out the OnBeforeWebLogout and OnWebLogout events were not firing because of missing () on the function calls and for OnWebLogout() the session parameters were null due to the session being destroyed before OnWebLogout() was called:
$this->OnBeforeWebLogout();
$this->StatusToOffline();
$this->SessionHandler('destroy');
$this->OnWebLogout();
$this->OnBeforeWebLogout();
$this->OnWebLogout();
$this->StatusToOffline();
$this->SessionHandler('destroy');
One issue I’m less sure about was with the OnWebLogin() function. SMF Connector is expecting username, but only user is being passed from the function.
function OnWebLogin() { global $modx; $parameters = array('user' => $this->User); $modx->invokeEvent('OnWebLogin', $parameters); }
needed changing to
function OnWebLogin() { global $modx; $parameters = array( 'username' => $this->Username, 'user' => $this->User ); $modx->invokeEvent('OnWebLogin', $parameters); if (!empty($this->Report)) { return; //There was an error in the last step } }
Now I get a little hazy as to what is going on here. If the ’user’ parameter is still needed and what the difference is between ->User and ->Username?... anyhow it works for me!

$user['username']
May I ask why you changed the sequence/order of $this->OnWebLogout();
FROM:
Code:
$this->OnBeforeWebLogout();
$this->StatusToOffline();
$this->SessionHandler(’destroy’);
$this->OnWebLogout();
TO:
Code:
$this->OnBeforeWebLogout();
$this->OnWebLogout();
$this->StatusToOffline();
$this->SessionHandler(’destroy’);
Isn’t onWebLogout to be ran AFTER they are officially ’logged out’ (aka Session Destroyed)?
function OnWebLogout()
{
global $modx;
$parameters = array(
'userid' => $_SESSION['webInternalKey'],
'internalKey' => $_SESSION['webInternalKey'],
'username' => $_SESSION['webShortname']
);
$modx->invokeEvent('OnWebLogout', $parameters);
}
I’ve updated SMFConnect to use the $user array. I just need to sync the login durations next, but that is another story (topic!)
How can I fix this?I’m not sure if this is me or WeboginPE...my guess is me.
If you login as a manager and from the managerList of people you edit someone else’s profile, the inputHandlers generated by WebLoginPE set their values according to the user viewing as opposed to the user whose profile I am editing. Making any changes to these fields populates the database correctly however.
Is there something I am doing wrong?
Thanks for any pointers!
Taff