Skip to content

Commit

Permalink
ADDED: swish_logged_in/3
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Wielemaker authored and Jan Wielemaker committed Jun 24, 2016
1 parent 226d24f commit 37d8c91
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/authenticate.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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), []).
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 37d8c91

Please sign in to comment.