phpBB

Code Changes

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

  Unmodified   Added   Modified   Removed
Line 27Line 27
		);
}


		);
}


 
	/**
* Update passwords with convert flag to have $CP$ prefix
*
* @param int $start Limit start value
* @return int|void Null if conversion is finished, next start value if not
*/

	public function update_passwords($start)
{
// Nothing to do if user_pass_convert column doesn't exist

	public function update_passwords($start)
{
// Nothing to do if user_pass_convert column doesn't exist

Line 51Line 57
			$converted_users++;

$user_id = (int) $row['user_id'];

			$converted_users++;

$user_id = (int) $row['user_id'];

			// Only prefix passwords without proper prefix
if (!isset($update_users[$user_id]) && !preg_match('#^\$([a-zA-Z0-9\\\]*?)\$#', $row['user_password']))

			// Prefix all passwords that need to be converted
if (!isset($update_users[$user_id]))

			{
// 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.