Innanzitutto GRAZIE, e poi:
Gran bella domanda!!!
L'ho trovata in due altre funzioni, però mi sembra che venga inizializzata in login.
le due altre funzioni sono queste nello script (a meno che siano sepolte in qualche altro file):
function login ($username, $password) {
$username = $_POST[username];
$password=$_POST[password];
if (!$username || !$password) {
return $this->error[14];
}
else {
if (!eregi("^[[:alnum:]_-]+$", $username)) {
return $this->error[3];
}
if (!eregi("^[[:alnum:]_-]+$", $password)) {
return $this->error[7];
}
mysql_connect($this->server, $this->db_user, $this->db_pass);
mysql_select_db($this->database);
$query = mysql_query("select id from authlib_login where username = '$username' and password = '$password'");
$result = mysql_num_rows($query);
mysql_close();
if ($result < 1) {
return false;
}
else {
list ($id) = mysql_fetch_row($query);
$hash = md5($username.$this->secret);
setcookie("hello", "$username:$hash:$id", time()+3600);
return 2;
}
}
}
function logout () {
setcookie("hello");
header("Location: $this->logout_url");
}
Help!!!

Rispondi quotando