diff options
Diffstat (limited to 'jimbrella/users.py')
-rw-r--r-- | jimbrella/users.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/jimbrella/users.py b/jimbrella/users.py index c68908f..3276062 100644 --- a/jimbrella/users.py +++ b/jimbrella/users.py @@ -72,3 +72,13 @@ class Users(CsvTable): "email": "", } self._append(user) + + def find(self, username) -> dict: + """Find a user and return it in its `dict` structure.""" + + users = self._read() + for user in users: + if user["username"] == username: + return user + + return None |