mirror of
https://github.com/nextcloud/passman.git
synced 2024-12-28 19:04:15 +08:00
Fix count
This commit is contained in:
parent
3524cded0d
commit
ef6eb74415
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ class CredentialMapper extends Mapper {
|
|||
$sql = 'SELECT * FROM `*PREFIX*passman_credentials` ' .
|
||||
'WHERE `user_id` = ? and vault_id = ? AND shared_key is NULL LIMIT 20';
|
||||
$entities = $this->findEntities($sql, [$user_id, $vault_id]);
|
||||
$count = count($entities);
|
||||
$count = count($entities)-1;
|
||||
$entities = array_splice($entities, rand(0, $count), 1);
|
||||
return $entities;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue