Zeile 109 | Zeile 109 |
---|
} if(!$user['password']) {
|
} if(!$user['password']) {
|
$query = $db->simple_select("users", "uid,username,password,salt,loginkey,usergroup", "uid='".intval($uid)."'", array('limit' => 1));
| $query = $db->simple_select("users", "uid,username,password,salt,loginkey,usergroup", "uid='".intval($uid)."'");
|
$user = $db->fetch_array($query); } if(!$user['salt'])
| $user = $db->fetch_array($query); } if(!$user['salt'])
|
Zeile 121 | Zeile 121 |
---|
"salt" => $user['salt'], "password" => $user['password'] );
|
"salt" => $user['salt'], "password" => $user['password'] );
|
$db->update_query("users", $sql_array, "uid='".$user['uid']."'", 1);
| $db->update_query("users", $sql_array, "uid='".$user['uid']."'");
|
}
if(!$user['loginkey'])
| }
if(!$user['loginkey'])
|
Zeile 130 | Zeile 130 |
---|
$sql_array = array( "loginkey" => $user['loginkey'] );
|
$sql_array = array( "loginkey" => $user['loginkey'] );
|
$db->update_query("users", $sql_array, "uid = ".$user['uid'], 1);
| $db->update_query("users", $sql_array, "uid = ".$user['uid']);
|
} if(salt_password(md5($password), $user['salt']) == $user['password']) {
| } if(salt_password(md5($password), $user['salt']) == $user['password']) {
|
Zeile 159 | Zeile 159 |
---|
// If no salt was specified, check in database first, if still doesn't exist, create one if(!$salt) {
|
// If no salt was specified, check in database first, if still doesn't exist, create one if(!$salt) {
|
$query = $db->simple_select("users", "salt", "uid='$uid'", array('limit' => 1));
| $query = $db->simple_select("users", "salt", "uid='$uid'");
|
$user = $db->fetch_array($query); if($user['salt']) {
| $user = $db->fetch_array($query); if($user['salt']) {
|
Zeile 181 | Zeile 181 |
---|
// Update password and login key in database $newpassword['password'] = $saltedpw; $newpassword['loginkey'] = $loginkey;
|
// Update password and login key in database $newpassword['password'] = $saltedpw; $newpassword['loginkey'] = $loginkey;
|
$db->update_query("users", $newpassword, "uid='$uid'", 1);
| $db->update_query("users", $newpassword, "uid='$uid'");
|
$plugins->run_hooks("password_changed");
| $plugins->run_hooks("password_changed");
|
Zeile 234 | Zeile 234 |
---|
$sql_array = array( "salt" => $salt );
|
$sql_array = array( "salt" => $salt );
|
$db->update_query("users", $sql_array, "uid='{$uid}'", 1);
| $db->update_query("users", $sql_array, "uid='{$uid}'");
|
return $salt; }
| return $salt; }
|
Zeile 253 | Zeile 253 |
---|
$sql_array = array( "loginkey" => $loginkey );
|
$sql_array = array( "loginkey" => $loginkey );
|
$db->update_query("users", $sql_array, "uid='{$uid}'", 1);
| $db->update_query("users", $sql_array, "uid='{$uid}'");
|
return $loginkey;
| return $loginkey;
|
Zeile 282 | Zeile 282 |
---|
return; }
|
return; }
|
$query = $db->simple_select("threadsubscriptions", "*", "tid='".intval($tid)."' AND uid='".intval($uid)."'", array('limit' => 1));
| $query = $db->simple_select("threadsubscriptions", "*", "tid='".intval($tid)."' AND uid='".intval($uid)."'");
|
$subscription = $db->fetch_array($query); if(!$subscription['tid']) {
| $subscription = $db->fetch_array($query); if(!$subscription['tid']) {
|