Login does not work on homepage.
Issue #10
new
This module was working fine until a month ago, then suddenly it stopped working in the desired manner. The login happens from pages other than the home page. But when someone tries to login from the homepage, it just does not happen. I have been careful about the $redirectDestination and below is the code I am using, any suggestions will be extremely helpful.
<? if($user->isGuest()) {
$fu = $modules->get("FrontendUser");
$fu->login(array('username', 'password', 'persist'));
if($page->path != "/"){
$redirectDestination = "/";
}
else {
$redirectDestination = "/blog/";
}
?>
<div class="new_login" id="new_login"><? $fu->process($redirectDestination); echo $fu->render(); ?></div>
<? }
else{ ?>
<h4 style="padding-left:3em;text-transform:uppercase; -webkit-margin-after:0em; ">Welcome <?echo $user->name; ?></h4>
<h5 style="padding-left:3.4em; -webkit-margin-before:0em;"><a href='/thank-you/' style="text-decoration:none; text-transform:uppercase;color:#bdbec0;">Logout?</a></h5>
</div>
<? } ?>
</div>
You can see the working site at http://umbra.lightcube.in
Comments (1)
-
repo owner - Log in to comment
Hi,
any changes done like Update PW version? Code changes? Additional modules installed? At the moment the module isn't maintained / updated. So it could break if You update PW.