Jump to content

require login to access page downloads.php + redirect on login submit


USA_Webmaster

Recommended Posts

I copy / pasted login form code from login.tpl, but this code doesn't redirect BACKTO downloads.php page. Might you have any advice to share?

 

I'm using six theme, and I read over this post: https://forum.whmcs.com/showthread.php?7738-Required-login-to-access-Downloads

 

It helped, so far, but maybe there is cleaner approach? A thing I noticed is that this only prevents downloads.php but not the specific category pages or anything... https://domain.com/downloads.php/1/XYZ?action=displaycat&catid=1

 

I open up the downloads.php file but that is encoded. Normally, I would just edit the .php file at root, and uncomment the code after $ca->initPage();

 

//$ca->requireLogin(); // Uncomment this line to require a login to access this page

 

Thanks for your time and good luck,

 

source #1 http://stackoverflow.com/questions/3303675/how-to-make-an-input-type-button-act-like-a-hyperlink-and-redirect-using-a-get-r

Edited by USA_Webmaster
Link to comment
Share on other sites

  • 4 months later...

It would be nice if there was an easy way to login and redirect back to same page.

 

Like you - having looked at the forums, it does not appear to be easy with smarty and whmcs.

 

There used to be a simple method login/goto but that's no longer working.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated