mirror of
https://github.com/gamaio/UnPS-API.git
synced 2024-12-22 02:02:40 +00:00
Fix sql query for register api user
API User Creation test - Sucessful
This commit is contained in:
parent
7b4d4da8f6
commit
17be9fd2f0
@ -299,10 +299,11 @@ class api{
|
|||||||
}
|
}
|
||||||
if($canRegAPI != 1) return 'You are not authorized to register to use the API';
|
if($canRegAPI != 1) return 'You are not authorized to register to use the API';
|
||||||
|
|
||||||
|
$theapikey = '';
|
||||||
|
|
||||||
// I don't really like this code - Basically I need to check if a generated key is totally unique and generate a new one if it isn't
|
// I don't really like this code - Basically I need to check if a generated key is totally unique and generate a new one if it isn't
|
||||||
$sql = "SELECT * FROM `users`";
|
$sql = "SELECT * FROM `users`";
|
||||||
if(!$result = $apidb->query($apisql)) return 'ERROR: ['.$apidb->error.']';
|
if(!$result = $apidb->query($sql)) return 'ERROR: ['.$apidb->error.']';
|
||||||
$theapikey = '';
|
|
||||||
while($row = $result->fetch_assoc()){
|
while($row = $result->fetch_assoc()){
|
||||||
$theapikey .= $row['key'].'-';
|
$theapikey .= $row['key'].'-';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user