Skip to content
Snippets Groups Projects
Commit f825b959 authored by Bob Mottram's avatar Bob Mottram
Browse files

Additional pleroma user removal queries

parent 9ce6655e
No related branches found
No related tags found
No related merge requests found
......@@ -490,8 +490,17 @@ function logging_off_pleroma {
function remove_user_pleroma {
remove_username="$1"
if [ ! "$remove_username" ]; then
return
fi
cd $PLEROMA_DIR || exit 25
sudo -u pleroma mix pleroma.user rm "$remove_username"
cd /etc/postgresql || exit 26
sudo -u postgres psql -d pleroma -c "delete from users where nickname is null and local is true;"
sudo -u postgres psql -d pleroma -c "delete from users where nickname = '$remove_username' and local is true;"
"${PROJECT_NAME}-pass" -u "$remove_username" --rmapp pleroma
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment