
function LoginHomePage()
{
global $modx;
if (!empty($this->Report))
{
return; //There was an error in the last step
}
if ($this->Type == 'taconite')
{
return;
}
/*--- Web User Login Home page fix --->
# check to see if the web user has a home page ID set and redirects if so
*/
$web_user_settings = $modx->getFullTableName('web_user_settings');
$web_UserSettings = $modx->db->query("SELECT setting_value FROM ".$web_user_settings." WHERE `webuser`='".$this->User['internalKey']."' AND `setting_name`='login_home'");
$limit = count($web_UserSettings);
if ($limit > 0){
$row = $modx->fetchRow($web_UserSettings);
$web_UserLoginHomeID = $row['setting_value'];
if($web_UserLoginHomeID !=""){
$url = $modx->makeURL($web_UserLoginHomeID);
$modx->sendRedirect($url,0,'REDIRECT_REFRESH');
return;
}
}
/*--- end modification ---*/
if (!empty($this->liHomeId))
{
if (is_array($this->liHomeId))
{
foreach($this->liHomeId as $id)
{
$id = trim($id);
if ($modx->getPageInfo($id))
{
$url = $modx->makeURL($id);
$modx->sendRedirect($url,0,'REDIRECT_REFRESH');
return;
}
}
}
else
{
$url = $modx->makeURL($this->loHomeId);
$modx->sendRedirect($url,0,'REDIRECT_REFRESH');
return;
}
}
else
{
$url = $modx->makeURL($modx->documentIdentifier);
$modx->sendRedirect($url,0,'REDIRECT_REFRESH');
}
return;
}
I believe this will fix the Home Page login issue, so far with my testing it has worked fine but only heavy duty testing will tell
This requires modifying the assets/snippets/webloginpe/webloginpe.class.php so make a backup copy of your working file before modification.
With this modification, if you add a Login Home Page ID to a webusers settings in the manager, thats where they will be redirected regardless of the ID’s set in the snippet call.
Quote from: Breezer at Jun 11, 2008, 06:46 PM
I believe this will fix the Home Page login issue, so far with my testing it has worked fine but only heavy duty testing will tell
This requires modifying the assets/snippets/webloginpe/webloginpe.class.php so make a backup copy of your working file before modification.
With this modification, if you add a Login Home Page ID to a webusers settings in the manager, thats where they will be redirected regardless of the ID’s set in the snippet call.
This is great. In the middle of my first use of WebloginPE. Will this be making it’s way into the 1.3.1 update?
I should be able to add it.
Open webloginpe.class.php in a text editor and scroll down to line 2102 ( if you don’t have line numbers find this section: function LoginHomePage() )