<![CDATA[ Weblogin redirect clients to personal page problem - My Forums]]> https://forums.modx.com/thread/?thread=44760 <![CDATA[Re: Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257495 breezer Jun 01, 2009, 05:36 AM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257495 <![CDATA[Re: Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257494 SimonMW Jun 01, 2009, 04:44 AM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257494 <![CDATA[Re: Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257493 breezer May 28, 2009, 01:48 PM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257493 <![CDATA[Re: Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257492 SimonMW May 28, 2009, 11:52 AM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257492 <![CDATA[Re: Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257491 breezer May 28, 2009, 10:56 AM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257491 <![CDATA[Re: Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257490 breezer May 28, 2009, 10:16 AM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257490 <![CDATA[Re: Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257489
Thanks for the code. I just tried it, but it doesn’t appear to work.]]>
SimonMW May 28, 2009, 10:08 AM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257489
<![CDATA[Re: Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257488 On the System Events tab, under "Web Access Service Events", check OnWebLogin
<?php
// start copying code below here
/*  WU_Redirect_onlogin.plugin.php

*/
$e = &$modx->Event;
switch ($e->name) {

case "OnWebLogin":

   $WU_LoginHID =$_SESSION[webUsrConfigSet][login_home];
   
   if($WU_LoginHID !=''){
         $modx->sendRedirect($WU_LoginHID);
   }
   
  break;

default: "";

  return;
}

// stop copying code here
?>


Make sure your plugin code does not have the start (<?php) and ending (?>) php tags or it breaks the plugin, they are just here for highlighting purposes smiley]]>
breezer May 28, 2009, 06:58 AM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257488
<![CDATA[Weblogin redirect clients to personal page problem]]> https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257487
I am trying to set up a client area on my website so that they can login using a Weblogin form and automatically get redirected to their own personal page.

I set up the Web Users and set the Login Homepage in the Web User configuration to the page I want them to be redirected to once they login. I then created a separate document group and web user group and linked them for each of my clients.

I then created a document for each of my clients and set the access permissions of the documents to the specific clients.

I then used the Weblogin snippet to set up a login page. However it does not redirect to the clients specific page. Setting up &loginhomeid doesn’t seem to work properly as I need to specify each page id. I can get the first web user in the list to redirect to the first id in the &loginhomeid parameter. But any subsequent web users just end up being redirected to the site homepage.

How do I connect the &loginhomeid parameter to the "Login Homepage" parameter in the Web User setup so that each individual client is automatically taken to their personal page?]]>
SimonMW May 28, 2009, 03:03 AM https://forums.modx.com/thread/44760/weblogin-redirect-clients-to-personal-page-problem#dis-post-257487