[Web] Allow multiple sync jobs with same username, fixes #464
This commit is contained in:
parent
84ad579437
commit
f4db3a7a00
@ -135,9 +135,9 @@ function mailbox($_action, $_type, $_data = null) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$stmt = $pdo->prepare("SELECT `user2`, `user1` FROM `imapsync`
|
$stmt = $pdo->prepare("SELECT '1' FROM `imapsync`
|
||||||
WHERE `user2` = :user2 AND `user1` = :user1");
|
WHERE `user2` = :user2 AND `user1` = :user1 AND `host1` = :host1");
|
||||||
$stmt->execute(array(':user1' => $user1, ':user2' => $username));
|
$stmt->execute(array(':user1' => $user1, ':user2' => $username, ':host1' => $host1));
|
||||||
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
$num_results = count($stmt->fetchAll(PDO::FETCH_ASSOC));
|
||||||
}
|
}
|
||||||
catch(PDOException $e) {
|
catch(PDOException $e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user