About us
ProcessMaker Inc. is the developer of the ProcessMaker Workflow & BPM Software Suite. Read more
if ($RBAC->singleSignOn) {
G::header('Location: ' . $sLocation);
die();
}
if ($RBAC->singleSignOn) {
// Update the User's last login date:
$u = new Users();
$aUserProps = array(
'USR_UID' => $aLog['USR_UID'],
'USR_LAST_LOGIN' => $aLog['LOG_INIT_DATE']
);
$u->update($aUserProps);
G::header('Location: ' . $sLocation);
die();
}
if ($activeSession){
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');
}
G::header('Location: ' . $sLocation);
if ($activeSession){
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');
}
// Update the User's last login date:
$u = new Users();
$aUserProps = array(
'USR_UID' => $aLog['USR_UID'],
'USR_LAST_LOGIN' => $aLog['LOG_INIT_DATE']
);
$u->update($aUserProps);
$oPluginRegistry = PluginRegistry::loadSingleton();
if ($oPluginRegistry->existsTrigger ( PM_AFTER_LOGIN )) {
$oPluginRegistry->executeTriggers ( PM_AFTER_LOGIN , $_SESSION['USER_LOGGED'] );
}
G::header('Location: ' . $sLocation);
amosbatto wrote: ↑Tue Aug 13, 2019 11:15 pm The problem is that the Community Edition doesn't have the \ProcessMaker\Model\Users class which is used to update the last login date in the Enterprise Edition.
Here is how to fix it. Edit the file workflow/engine/methods/login/authentication.php and change line 307 from:Code: Select allTo:if ($RBAC->singleSignOn) { G::header('Location: ' . $sLocation); die(); }
Code: Select allif ($RBAC->singleSignOn) { // Update the User's last login date: $u = new Users(); $aUserProps = array( 'USR_UID' => $aLog['USR_UID'], 'USR_LAST_LOGIN' => $aLog['LOG_INIT_DATE'] ); $u->update($aUserProps); G::header('Location: ' . $sLocation); die(); }
Then, change line 380 from:Code: Select allTo:if ($activeSession){ setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/'); } G::header('Location: ' . $sLocation);
Code: Select allif ($activeSession){ setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/'); } // Update the User's last login date: $u = new Users(); $aUserProps = array( 'USR_UID' => $aLog['USR_UID'], 'USR_LAST_LOGIN' => $aLog['LOG_INIT_DATE'] ); $u->update($aUserProps); $oPluginRegistry = PluginRegistry::loadSingleton(); if ($oPluginRegistry->existsTrigger ( PM_AFTER_LOGIN )) { $oPluginRegistry->executeTriggers ( PM_AFTER_LOGIN , $_SESSION['USER_LOGGED'] ); } G::header('Location: ' . $sLocation);
After making that code change, the last login date should appear:
LastLoginDateInUsersList.png
However, it is essential to use it responsibly and[…]
Web3 development encompasses creating decentralize[…]
The Upland Clone Script, offered by Dappsfirm, rep[…]
Dappsfirm offers a bet365 clone script that mirror[…]