phpBB

Code Changes

File: phpbb/db/migration/data/v310/passwords_convert_p1.php

  Unmodified   Added   Modified   Removed
Line 56Line 56
			{
// Use $CP$ prefix for passwords that need to
// be converted and set pass convert to false.

			{
// Use $CP$ prefix for passwords that need to
// be converted and set pass convert to false.

				$update_users[$user_id] = array(
'user_password' => '$CP$' . $row['user_password'],
'user_pass_convert' => 0,
);

				$update_users[$user_id] = '$CP$' . $row['user_password'];




			}
}
$this->db->sql_freeresult($result);


			}
}
$this->db->sql_freeresult($result);


		foreach ($update_users as $user_id => $user_data)

		foreach ($update_users as $user_id => $user_password)

		{

		{

			$sql = 'UPDATE ' . $this->table_prefix . 'users
SET ' . $this->db->sql_build_array('UPDATE', $user_data) . '
WHERE user_id = ' . $user_id;

			$sql = 'UPDATE ' . $this->table_prefix . "users
SET user_password = '" . $this->db->sql_escape($user_password) . "'
WHERE user_id = $user_id";

			$this->sql_query($sql);
}


			$this->sql_query($sql);
}