php - Joomla - Automatically log users in using $_GET variables -
i know sounds dumb, have client sends out newsletters. target market extremely computer illiterate, client requires embed login details in urls on newsletter users can logged in automatically in joomla front-end.
what have propsed script gets username , password url using $_get , how can pass $my object gets created once user logs in through joomla login page?
obviously, i'm not getting here code-related, concept stays same, want automatically log people in using url , if redirect them page wanted go, in 1 sweep.
thanks in advance comments & advice.
this terrible in terms of security, you'd need pass
login.php?username=x&password=y
and change login accept $_request instead of $_post
$username = $_request['username']; $password = $_request['password']; $loggedin = user::login($username, $password);
but again, terrible security standpoint.
if need fast way this, should consider emailing them hash of salt , username , logging them in way. this:
login.php?user=aw48hgghsudghaw9eg
then
$hash = $_get['user']; $result = mysql_query("select username, password users md5("salt_string", username) = $hash"); if (mysql_num_rows($result)) { $row = mysql_result($result); $loggedin = user::login($row['username'], $row['$password']); }
or similar.
Comments
Post a Comment