Forums

How Do I Validate a Password ?

PigeonTech 26 Oct, 2014
I've read through the forum and found several references to this but can't seem to find an answer that explains in simple terms how / where to add the php code needed to validate a password field in V5.

Is there a simple dummies guide to doing this please. I am looking for a very simple way of password protecting a Joomla article without needing a full blown user login function. ChrornoForms seems to have the answer but I can't figure it out.

Thanks
GreyHead 26 Oct, 2014
Hi PigeonTech,

I don't know how you would do that with Joomla! 3. I have a plug-in I use one WordPress but all the Joomla! extensions that used to do this seem to have disappeared.

It's easy enough to create a form that requires a password and redirects to an article, What I don't know is how you would limit the display of the article.

One way might be to add a key in the redirect URL e.g. &pass=xx99xx then you could put a hidden module on the article page that looked for that key and redirected the user if it wasn't present. Something like this:
<?php
$app = JFactory::getApplication();
$uri = JFactory::getUri();
$pass = $uri->getVar('pass');
if  ( $pass != 'xx99xx' ) {
  $app->redirect('index.php');
}
?>


Bob
PigeonTech 27 Oct, 2014
Thanks for all your quick responses.

Bob, sorry, what I was looking for was a simple laymans guide to using Chronoforms. You have placed my level of understanding way above where it actually is!😲 . Whilst I can figure out what's going on in php, I'm not a coder and have no clue who what why or where I put the code in chronoforms.

I have come up with a solution using php directly in a Joomla article via Sourcerer. Works okay but I would still like to understand how to use Chronoforms to do this for future projects.
GreyHead 27 Oct, 2014
Hi PigeonTech,

The Sourcerer solution sounds good to me. You'd need to use something like that to implement the code I suggested (I've used the similar Jumi extension in the past).

There are some videos in the FAQs that will introduce you to ChronoForms. They are made with an older version of ChronoForms but the current version works in a similar way but with an updated admin interface.

Bob
This topic is locked and no more replies can be posted.