Searching the www I found the flw. page with a solution for a login and a redirect to a private page:
http://www.escpro.de/esc/posts/benutzer-auf-private-seite-weiterleiten-132.php flw. I made a try to translate it to English
Users redirect to private pageWho would like to offer its users in WebsiteBaker an individual or group-page, Can as explained as follows redirect its users directly to his personal page( instead of the first beeing forwarded to the default WebsiteBaker home page.
For registration, we use the normal WebsiteBaker login mask, with a redirect to a hidden intermediate page (in this example wbuser.php)
This for example could look like this: (The page wbuser.php we set on the visibility: hidden)
<?php if(FRONTEND_LOGIN AND !$admin->is_authenticated()) {
$page = 'http://' .$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
?>
<form name="login" action="<?php echo LOGIN_URL; ?>?redirect=<?php echo WB_URL; echo'/pages/'; echo 'wbuser.php';?>" method="post">
<fieldset class="topbox">
<legend><?php echo $TEXT['LOGIN']; ?></legend>
<fieldset class="topbox">
<div class="topboxbody">
<label for="username"><?php echo $TEXT['USERNAME']; ?>:</label>
<input type="text" name="username" id="username" class="text" />
<label for="password"><?php echo $TEXT['PASSWORD']; ?>:</label>
<input type="password" name="password" id="password" class="text" />
<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" class="submit" /><br />
<a href="<?php echo FORGOT_URL; ?>"><?php echo $TEXT['FORGOT_DETAILS']; ?></a><br />
</div>
</fieldset>
</form>
What does this login in the template? As we have previously don't have a username, we redirect the user after te login to the page "mydomain.de/pages/wbuser.php.
Redirect the user to his personal page! Now that the user is located on wbuser.php we know his username and we can use it.
Now of course we also need to adapt this page the way the user is forwarded to his personal page.
This we will obtain creating a Code section on the wbuser.php page and introduce the following code:
echo'<meta http-equiv="refresh" content="5; url=';
echo WB_URL; echo'/pages/'; echo $admin->get_display_name(); echo '.php';
echo'">';
The user will now be redirected, after waiting 5 seconds ("content"= 5) , to the page with his username.
In the example:
www.mydomain.de / pages / myusername.php
To the personal page, we can use different redirect types .
For example: over a php location or a redirect over a Meta function.
Group LoginWho wants to redirect the user to a grouppage can use the variable $ group_name and redirect the user from group "family" to the page "family".
Example WebsiteBaker Login redirect for groups:
echo'<meta http-equiv="refresh" content="5; url=';
echo WB_URL; echo'/pages/'; echo $admin->get_group_name(); echo '.php';
echo'">';
Alternative for redirection over Location:<?php
header('location:
www.meine.domain.de/pages/username.php');exit;
?>
As I am a nerd in PHP coding is ther someone who could help to translate the flw part to code so it can be used in a code page
<?php if(FRONTEND_LOGIN AND !$admin->is_authenticated()) {
$page = 'http://' .$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
?>
<form name="login" action="<?php echo LOGIN_URL; ?>?redirect=<?php echo WB_URL; echo'/pages/'; echo 'wbuser.php';?>" method="post">
<fieldset class="topbox">
<legend><?php echo $TEXT['LOGIN']; ?></legend>
<fieldset class="topbox">
<div class="topboxbody">
<label for="username"><?php echo $TEXT['USERNAME']; ?>:</label>
<input type="text" name="username" id="username" class="text" />
<label for="password"><?php echo $TEXT['PASSWORD']; ?>:</label>
<input type="password" name="password" id="password" class="text" />
<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" class="submit" /><br />
<a href="<?php echo FORGOT_URL; ?>"><?php echo $TEXT['FORGOT_DETAILS']; ?></a><br />
</div>
</fieldset>
</form>