mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #84 from YunoHost/helper-user-exists
[enh] Add ynh_user_exists helper.
This commit is contained in:
commit
4a4ac5f233
1 changed files with 5 additions and 0 deletions
5
data/apps/helpers.d/user
Normal file
5
data/apps/helpers.d/user
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
# Check if a user exists
|
||||
ynh_user_exists() {
|
||||
sudo yunohost user list --json | grep -q "\"username\": \"${1}\""
|
||||
}
|
Loading…
Add table
Reference in a new issue