
if($_SESSION['mgrValidated']) {
// check if we should redirect user to a web page
$tbl = $modx->getFullTableName('user_settings');
$id = $modx->db->getValue("SELECT setting_value FROM {$tbl} WHERE user = '{$usr_internalKey}' AND setting_name = 'manager_login_startup';");
if(isset($id) && $id>0) {
$url = $modx->makeUrl($id);
header("Location: {$url}");
}
}
]
I tried to replicate the code from the back end and install it in a snippet to implement deleting users. Do you think this has any chance of working? Or is there a way to do it?