Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to a member function Lang() on a non-object when user is not logged in #2

Open
danpospisil opened this issue Jul 7, 2013 · 0 comments

Comments

@danpospisil
Copy link

When user is not logged in, insted of showing him the login form, an error is thrown:
Fatal error: Call to a member function Lang() on a non-object in /var/www/nmvd/tmp/templates_c/FrontEndUsers^53f6817f85fc8b121978a61928d6e31ad0602069.module_db_tpl.FrontEndUsers;feusers_loginform.php on line 43

It's because this is missing (copied from DoAction from FrontEndUsers):
$smarty->assign('feuactionid',$id);
$smarty->assign('feuactionparams',$params);
$smarty->assign('mod',$this);
$smarty->assign($this->GetName(),$this);
but more modifications are needed to make this work.
So instead I modified the code to redirect user to my login form.
$manager = &$gCms->GetHierarchyManager();
$node = &$manager->sureGetNodeByAlias('login');
$content = &$node->GetContent();
if (isset($content) && is_object($content))
{
if ($content->GetURL() != '')
{
redirect($content->GetURL());
}
}

It might help somebody until it's fixed.
Using:
CMSMS 1.11.7
DownloadManager 1.5.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant