From 37d8c91f6f48361937c8aa47da54c3e62c7e8bbd Mon Sep 17 00:00:00 2001 From: Jan Wielemaker Date: Fri, 24 Jun 2016 18:00:30 +0200 Subject: [PATCH] ADDED: swish_logged_in/3 --- lib/authenticate.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/authenticate.pl b/lib/authenticate.pl index 52ef8c57f..8881f4c77 100644 --- a/lib/authenticate.pl +++ b/lib/authenticate.pl @@ -31,6 +31,7 @@ [ swish_add_user/3, % +User, +Passwd, +Fields swish_add_user/1, % +Dict swish_add_user/0, + swish_logged_in/3, % +Request, -User, -Data swish_current_user/2 % ?User, ?Data ]). :- use_module(library(pengines), []). @@ -198,6 +199,15 @@ password_file(File), http_current_user(File, User, [_Hash,Group,RealName,Email]). +%% swish_logged_in(+Request, -User, -UserData) is det. +% +% True when Request is associated with User. + +swish_logged_in(Request, User, UserData) :- + logged_in(Request, User), + swish_current_user(User, UserData). + + %% swish_add_user(+User, +Passwd, +Fields) is det. % % Add a new user to the SWISH password file. Defined Fields are