Project

General

Profile

« Previous | Next » 

Revision 1318

Added by Dietmar over 14 years ago

Ticket #976 Using md5 also for the username inside class.login.php

View differences:

class.login.php
144 144
	function authenticate() {
145 145
		// Get user information
146 146
		$database = new database();
147
		$query = "SELECT * FROM ".$this->USERS_TABLE." WHERE username = '".$this->username."' AND password = '".$this->password."' AND active = '1'";
147
		$query = 'SELECT * FROM `'.$this->USERS_TABLE.'` WHERE MD5(`username`) = "'.md5($this->username).'" AND `password` = "'.$this->password.'" AND `active` = 1';
148 148
		$results = $database->query($query);
149 149
		$results_array = $results->fetchRow();
150 150
		$num_rows = $results->numRows();

Also available in: Unified diff