diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2016-05-28 00:28:06 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2016-05-28 00:28:06 +0200 |
commit | 052ab619c0611fc7ad61ba53aa26e94a63df1fd5 (patch) | |
tree | 31a32b22c9432127b29079677ebda29f04760c70 /web/api/write/oplog | |
parent | 6f1fc97c9c097249e316f85a914aa439b4273448 (diff) |
front/api: Add user-provided nick to oplog
Fixes #84
It's really stupid simple, but it will work.
Diffstat (limited to 'web/api/write/oplog')
-rwxr-xr-x | web/api/write/oplog | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/api/write/oplog b/web/api/write/oplog index 736ba2b..73b807b 100755 --- a/web/api/write/oplog +++ b/web/api/write/oplog @@ -9,7 +9,7 @@ use warnings; my $in = get_input(); my %tmp = %{JSON::XS::decode_json($in)}; -my $user = $ENV{'REMOTE_USER'} || "undefined"; +my $user = $tmp{'user'} || $ENV{'REMOTE_USER'} || "undefined"; my $q = $nms::web::dbh->prepare("INSERT INTO oplog (username, systems, log) values (?,?,?);"); $q->execute($user, $tmp{'systems'}, $tmp{'log'}); |