Skip to content
Snippets Groups Projects
Verified Commit c06ec437 authored by Alain Sinzig's avatar Alain Sinzig
Browse files

add script to manually add users

parent 64f98b37
Branches
1 merge request!1Dev sinzig
#!/usr/bin/env bash
echo Create an account on the web-interface.
echo 'When asked to activate via email, enter your username (pseudo) here instead.'
echo -en "\nEnter your username: "
read username
keyid=$(
podman-compose exec \
-u postgres \
postgres \
bash -c "psql sosmath -A -F , -X -t -U www-sosmath <<< \"SELECT users_activation.id, users_activation.regkey FROM users_activation JOIN users ON users.id=users_activation.id WHERE users.pseudo='"${username}"';\""
)
key=$(
echo $keyid | awk -F "," '{ print $2 }'
)
id=$(
echo $keyid | awk -F "," '{ print $1 }'
)
echo "\nClick on: http://localhost/index.php?p=rep&do=activate&id=${id}&key=${key}"
echo Replace localhost with your domain.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment