commit c4948faa242bd4f644635471dfe43a38bfd527c5
parent 0ec1e37cfe75ef56198acd9b566fa08b77abe597
Author: hhvn <hayden@haydenvh.com>
Date: Sat, 27 Feb 2021 02:27:33 +0000
include/common.sh include/userinfo.sh: add log events for login/logout
Diffstat:
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/common.sh b/include/common.sh
@@ -10,6 +10,7 @@ bin(){
die(){
unlock_all
error "$@"
+ add_log "logout" "$user"
add_log "disconnection" "${REMOTE_HOST:-localhost}"
exit 1
}
diff --git a/include/userinfo.sh b/include/userinfo.sh
@@ -119,5 +119,6 @@ check(){
prompt "verification code" vercode
[ "$(userget $1 vercode)" = "$vercode" ] && ok "verification successful" && userset $1 expiry "" || error "incorrect verification code"
}
+ add_log "login" "$1"
ok "login success"
}