equal
deleted
inserted
replaced
273 |
273 |
274 // Username of user ID in the database is different from the name |
274 // Username of user ID in the database is different from the name |
275 // we have been given. User wants a change of username. Now, make |
275 // we have been given. User wants a change of username. Now, make |
276 // sure it doesn't already exist. |
276 // sure it doesn't already exist. |
277 |
277 |
278 $query = "SELECT id FROM users WHERE username = " . $db->query($user); |
278 $query = "SELECT id FROM users WHERE username = " . $db->quote($user); |
279 $result = $db->query($query); |
279 $result = $db->query($query); |
280 if (PEAR::isError($response)) { error($response->getMessage()); return false; } |
280 if (PEAR::isError($response)) { error($response->getMessage()); return false; } |
281 |
281 |
282 if($result->numRows() > 0) { |
282 if($result->numRows() > 0) { |
283 error(ERR_USER_EXIST); |
283 error(ERR_USER_EXIST); |