aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-11-11 09:37:26 +0100
committerJoas Schilling <coding@schilljs.com>2022-12-09 22:40:46 +0100
commit256fbe9d77f5413bed1bd1a39451daccdbe3517b (patch)
tree58ee901120c8051440d4eb3b0935288c9c0bde7e /lib/public
parent2f7a1fca5f1e2a14bcda169b9e8e8da14e720f2c (diff)
downloadnextcloud-server-256fbe9d77f5413bed1bd1a39451daccdbe3517b.tar.gz
nextcloud-server-256fbe9d77f5413bed1bd1a39451daccdbe3517b.zip
Validate if the user part of a "cloud id" can even be a valid user id
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/IUserManager.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public/IUserManager.php b/lib/public/IUserManager.php
index af0d5f08809..8caa027468b 100644
--- a/lib/public/IUserManager.php
+++ b/lib/public/IUserManager.php
@@ -212,4 +212,12 @@ interface IUserManager {
* @since 9.1.0
*/
public function getByEmail($email);
+
+ /**
+ * @param string $uid The user ID to validate
+ * @param bool $checkDataDirectory Whether it should be checked if files for the ID exist inside the data directory
+ * @throws \InvalidArgumentException Message is an already translated string with a reason why the ID is not valid
+ * @since 26.0.0
+ */
+ public function validateUserId(string $uid, bool $checkDataDirectory = false): void;
}