-
Notifications
You must be signed in to change notification settings - Fork 0
/
amelinium.model.user.html
104 lines (104 loc) · 88.9 KB
/
amelinium.model.user.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>amelinium.model.user documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Amelinium</span> <span class="project-version">1.0.1</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li><li class="depth-1 "><a href="20_hypermedia.html"><div class="inner"><span>Hypermedia-driven</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><a href="amelinium.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>amelinium</span></div></a></li><li class="depth-2 branch"><a href="amelinium.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-2"><a href="amelinium.api.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>api</span></div></a></li><li class="depth-3"><a href="amelinium.api.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4"><a href="amelinium.api.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3"><a href="amelinium.api.url.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>url</span></div></a></li><li class="depth-2 branch"><a href="amelinium.app.html"><div class="inner"><span class="tree" style="top: -114px;"><span class="top" style="height: 123px;"></span><span class="bottom"></span></span><span>app</span></div></a></li><li class="depth-2"><a href="amelinium.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>algo</span></div></div></li><li class="depth-4 branch"><a href="amelinium.auth.algo.append.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>append</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.fail.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fail</span></div></a></li><li class="depth-4 branch"><a href="amelinium.auth.algo.pbkdf2.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pbkdf2</span></div></a></li><li class="depth-4"><a href="amelinium.auth.algo.scrypt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scrypt</span></div></a></li><li class="depth-3 branch"><a href="amelinium.auth.pwd.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>pwd</span></div></a></li><li class="depth-3"><a href="amelinium.auth.specs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>specs</span></div></a></li><li class="depth-2"><a href="amelinium.common.html"><div class="inner"><span class="tree" style="top: -238px;"><span class="top" style="height: 247px;"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-3"><a href="amelinium.common.oplog.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>oplog</span></div></a></li><li class="depth-4"><a href="amelinium.common.oplog.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.common.populators.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-3"><a href="amelinium.common.swagger.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>swagger</span></div></a></li><li class="depth-2 branch"><a href="amelinium.core.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>core</span></div></a></li><li class="depth-2"><a href="amelinium.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-3"><a href="amelinium.db.sql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sql</span></div></a></li><li class="depth-2 branch"><a href="amelinium.errors.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-2"><a href="amelinium.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>client</span></div></div></li><li class="depth-4"><a href="amelinium.http.client.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.handler.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>handler</span></div></a></li><li class="depth-3"><a href="amelinium.http.middleware.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middleware</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.coercion.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coercion</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.content.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>content</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.debug.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>debug</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.format.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>format</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.headers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>headers</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.language.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>language</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.lazy-req.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>lazy-req</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.populators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>populators</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.remote-ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>remote-ip</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.roles.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>roles</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.middleware.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-4"><a href="amelinium.http.middleware.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-3 branch"><a href="amelinium.http.router.html"><div class="inner"><span class="tree" style="top: -424px;"><span class="top" style="height: 433px;"></span><span class="bottom"></span></span><span>router</span></div></a></li><li class="depth-3"><a href="amelinium.http.server.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></a></li><li class="depth-4 branch"><a href="amelinium.http.server.jetty.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>jetty</span></div></a></li><li class="depth-4"><a href="amelinium.http.server.undertow.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>undertow</span></div></a></li><li class="depth-2"><a href="amelinium.i18n.html"><div class="inner"><span class="tree" style="top: -672px;"><span class="top" style="height: 681px;"></span><span class="bottom"></span></span><span>i18n</span></div></a></li><li class="depth-3"><a href="amelinium.i18n.pluralizers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pluralizers</span></div></a></li><li class="depth-2 branch"><a href="amelinium.identity.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-2 branch"><a href="amelinium.locale.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>locale</span></div></a></li><li class="depth-2 branch"><a href="amelinium.logging.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logging</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>model</span></div></div></li><li class="depth-3 branch"><a href="amelinium.model.confirmation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>confirmation</span></div></a></li><li class="depth-3 current"><a href="amelinium.model.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>proto</span></div></div></li><li class="depth-3 branch"><a href="amelinium.proto.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.proto.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.proto.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.schemas.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>schemas</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>server</span></div></div></li><li class="depth-3"><a href="amelinium.server.ssl.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ssl</span></div></a></li><li class="depth-2 branch"><a href="amelinium.system.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>system</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></div></li><li class="depth-3 branch"><a href="amelinium.types.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.db.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.errors.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>errors</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-3 branch"><a href="amelinium.types.session.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>session</span></div></a></li><li class="depth-3"><a href="amelinium.types.twilio.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twilio</span></div></a></li><li class="depth-2 branch"><a href="amelinium.utils.html"><div class="inner"><span class="tree" style="top: -207px;"><span class="top" style="height: 216px;"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="amelinium.web.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>web</span></div></a></li><li class="depth-3"><a href="amelinium.web.controller.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>controller</span></div></a></li><li class="depth-4 branch"><a href="amelinium.web.controller.admin.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>admin</span></div></a></li><li class="depth-4"><a href="amelinium.web.controller.user.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>user</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.js.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>js</span></div></a></li><li class="depth-3 branch"><a href="amelinium.web.taggers.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>taggers</span></div></a></li><li class="depth-3"><a href="amelinium.web.url.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>url</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="amelinium.model.user.html#var-account-type"><div class="inner"><span>account-type</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-auth-by-session"><div class="inner"><span>auth-by-session</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-auth-by-user-id"><div class="inner"><span>auth-by-user-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-auth-config"><div class="inner"><span>auth-config</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-create"><div class="inner"><span>create</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-create-or-get-shared-suite-id"><div class="inner"><span>create-or-get-shared-suite-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-create-with-code"><div class="inner"><span>create-with-code</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-create-with-code-query"><div class="inner"><span>create-with-code-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-create-with-token"><div class="inner"><span>create-with-token</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-create-with-token-query"><div class="inner"><span>create-with-token-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-created"><div class="inner"><span>created</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-created-by"><div class="inner"><span>created-by</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-del-setting.21"><div class="inner"><span>del-setting!</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-email"><div class="inner"><span>email</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-existing"><div class="inner"><span>existing</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-exists.3F"><div class="inner"><span>exists?</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-find-id"><div class="inner"><span>find-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-first-name"><div class="inner"><span>first-name</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-generate-password"><div class="inner"><span>generate-password</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-id"><div class="inner"><span>get-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-ids"><div class="inner"><span>get-ids</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-login-data"><div class="inner"><span>get-login-data</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-password-suites"><div class="inner"><span>get-password-suites</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-setting"><div class="inner"><span>get-setting</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-shared-suite"><div class="inner"><span>get-shared-suite</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-shared-suite-id"><div class="inner"><span>get-shared-suite-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-user-by-email"><div class="inner"><span>get-user-by-email</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-user-by-id"><div class="inner"><span>get-user-by-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-get-user-by-uid"><div class="inner"><span>get-user-by-uid</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-hard-locked"><div class="inner"><span>hard-locked</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-hard-locked"><div class="inner"><span>hard-locked</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-id"><div class="inner"><span>id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-id-of"><div class="inner"><span>id-of</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-identity-cache"><div class="inner"><span>identity-cache</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-ids"><div class="inner"><span>ids</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-ids-of"><div class="inner"><span>ids-of</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-insert-shared-suite-query"><div class="inner"><span>insert-shared-suite-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-last-attempt"><div class="inner"><span>last-attempt</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-last-failed-ip"><div class="inner"><span>last-failed-ip</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-last-login"><div class="inner"><span>last-login</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-last-name"><div class="inner"><span>last-name</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-last-ok-ip"><div class="inner"><span>last-ok-ip</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-login-attempts"><div class="inner"><span>login-attempts</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-login-data-queries"><div class="inner"><span>login-data-queries</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-login-failed-update-query"><div class="inner"><span>login-failed-update-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-login-query"><div class="inner"><span>login-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-login-query-atypes-post"><div class="inner"><span>login-query-atypes-post</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-login-query-atypes-pre"><div class="inner"><span>login-query-atypes-pre</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-login-query-atypes-single"><div class="inner"><span>login-query-atypes-single</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-make-user-data"><div class="inner"><span>make-user-data</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-make-user-data-simple"><div class="inner"><span>make-user-data-simple</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-make-user-password"><div class="inner"><span>make-user-password</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-middle-name"><div class="inner"><span>middle-name</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-password-data-queries"><div class="inner"><span>password-data-queries</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-password-query"><div class="inner"><span>password-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-password-query-atypes-post"><div class="inner"><span>password-query-atypes-post</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-password-query-atypes-pre"><div class="inner"><span>password-query-atypes-pre</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-password-query-atypes-single"><div class="inner"><span>password-query-atypes-single</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-phone"><div class="inner"><span>phone</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prepare-password-suites"><div class="inner"><span>prepare-password-suites</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop"><div class="inner"><span>prop</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-by-id"><div class="inner"><span>prop-by-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-by-id-or-default"><div class="inner"><span>prop-by-id-or-default</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-by-ids"><div class="inner"><span>prop-by-ids</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-cols"><div class="inner"><span>prop-cols</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-del"><div class="inner"><span>prop-del</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-get-locked"><div class="inner"><span>prop-get-locked</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-get-roles"><div class="inner"><span>prop-get-roles</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-of"><div class="inner"><span>prop-of</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-prop-set"><div class="inner"><span>prop-set</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-props"><div class="inner"><span>props</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-props-by-id"><div class="inner"><span>props-by-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-props-by-ids"><div class="inner"><span>props-by-ids</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-props-cache"><div class="inner"><span>props-cache</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-props-del"><div class="inner"><span>props-del</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-props-of"><div class="inner"><span>props-of</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-props-set"><div class="inner"><span>props-set</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-put-setting.21"><div class="inner"><span>put-setting!</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-query-id"><div class="inner"><span>query-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-query-id-std"><div class="inner"><span>query-id-std</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-query-ids"><div class="inner"><span>query-ids</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-query-ids-std"><div class="inner"><span>query-ids-std</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-seq-prop"><div class="inner"><span>seq-prop</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-seq-prop-by-id"><div class="inner"><span>seq-prop-by-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-seq-prop-of"><div class="inner"><span>seq-prop-of</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-seq-props"><div class="inner"><span>seq-props</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-seq-props-by-id"><div class="inner"><span>seq-props-by-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-session"><div class="inner"><span>session</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-setting"><div class="inner"><span>setting</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-setting-del"><div class="inner"><span>setting-del</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-setting-set"><div class="inner"><span>setting-set</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-settings-cache"><div class="inner"><span>settings-cache</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-shared-suite-by-id-query"><div class="inner"><span>shared-suite-by-id-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-shared-suite-query"><div class="inner"><span>shared-suite-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-soft-lock-update-query"><div class="inner"><span>soft-lock-update-query</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-soft-locked"><div class="inner"><span>soft-locked</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-trusted-id"><div class="inner"><span>trusted-id</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-trusted-id-of"><div class="inner"><span>trusted-id-of</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-trusted-ids"><div class="inner"><span>trusted-ids</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-trusted-ids-of"><div class="inner"><span>trusted-ids-of</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-uid"><div class="inner"><span>uid</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-update-identity"><div class="inner"><span>update-identity</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-update-identity-query-code"><div class="inner"><span>update-identity-query-code</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-update-identity-query-token"><div class="inner"><span>update-identity-query-token</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-update-identity-with-code"><div class="inner"><span>update-identity-with-code</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-update-identity-with-token"><div class="inner"><span>update-identity-with-token</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-update-login-failed"><div class="inner"><span>update-login-failed</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-update-login-ok"><div class="inner"><span>update-login-ok</span></div></a></li><li class="depth-1"><a href="amelinium.model.user.html#var-update-password"><div class="inner"><span>update-password</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">amelinium.model.user</h1><h4 class="added">added in 1.0.0</h4><div class="doc"><div class="markdown"><p>amelinium service, user model.</p>
</div></div><div class="public anchor" id="var-account-type"><h3>account-type</h3><div class="usage"><code>(account-type db user-identity)</code><code>(account-type db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns an account type of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1207">view source</a></div></div><div class="public anchor" id="var-auth-by-session"><h3>auth-by-session</h3><div class="usage"><code>(auth-by-session settings-src smap)</code></div><div class="doc"><div class="markdown"><p>Gets authentication configuration (<code>AuthConfig</code>) for the given user identified by a session object. Uses cached user props provided by <code>amelinium.model.user/prop-of</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1132">view source</a></div></div><div class="public anchor" id="var-auth-by-user-id"><h3>auth-by-user-id</h3><div class="usage"><code>(auth-by-user-id settings-src user-id)</code></div><div class="doc"><div class="markdown"><p>Gets authentication configuration (<code>AuthConfig</code>) for the given user. Uses cached user props provided by <code>amelinium.model.user/prop-by-id</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1124">view source</a></div></div><div class="public anchor" id="var-auth-config"><h3>auth-config</h3><div class="usage"><code>(auth-config req user-identity)</code><code>(auth-config req user-identity identity-type)</code></div><div class="doc"><div class="markdown"><p>Returns user authentication configuration for the user specified by <code>user-identity</code> and optional <code>identity-type</code> (which can be <code>:email</code>, <code>:phone</code>, <code>:id</code> or <code>:uid</code>). If the identity type is not given it will be guessed.</p>
<p>The resulting map will be an authentication configuration (<code>AuthConfig</code> record) obtained for an account type associated with a user entry, or a generic authentication configuration if account type could not be found because either user does not exist in an authentication database or there is no account type specified for the user.</p>
<p>The returned record will have extra entries present (available only via its map interface):</p>
<ul>
<li><code>:identity/type</code> (detected or given identity type),</li>
<li><code>:user/account-type</code> (detected account type or <code>nil</code> if it couldn’t be obtained),</li>
<li><code>:user/properties</code> (user properties obtained when querying the database).</li>
</ul>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1140">view source</a></div></div><div class="public anchor" id="var-create"><h3>create</h3><div class="usage"><code>(create db email token code)</code></div><div class="doc"><div class="markdown"><p>Creates new user account identified with the given e-mail <code>email</code> by checking if it was successfully confirmed. Token (<code>token</code>) or code (<code>code</code>) must be provided to authorize operation. Returns a map with <code>:created?</code> set to <code>true</code> if user account is created.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L734">view source</a></div></div><div class="public anchor" id="var-create-or-get-shared-suite-id"><h3>create-or-get-shared-suite-id</h3><div class="usage"><code>(create-or-get-shared-suite-id db suite)</code></div><div class="doc"><div class="markdown"><p>Gets shared suite ID on a basis of its JSON content. If it does not exist, it is created. If the value of <code>suite</code> is a fixed-precision integer, it is returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L940">view source</a></div></div><div class="public anchor" id="var-create-with-code"><h3>create-with-code</h3><div class="usage"><code>(create-with-code db email code)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L721">view source</a></div></div><div class="public anchor" id="var-create-with-code-query"><h3>create-with-code-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L710">view source</a></div></div><div class="public anchor" id="var-create-with-token"><h3>create-with-token</h3><div class="usage"><code>(create-with-token db token)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L700">view source</a></div></div><div class="public anchor" id="var-create-with-token-query"><h3>create-with-token-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L689">view source</a></div></div><div class="public anchor" id="var-created"><h3>created</h3><div class="usage"><code>(created db user-identity)</code><code>(created db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns the existing user’s creation time. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1288">view source</a></div></div><div class="public anchor" id="var-created-by"><h3>created-by</h3><div class="usage"><code>(created-by db user-identity)</code><code>(created-by db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns the existing user’s creator ID. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1295">view source</a></div></div><div class="public anchor" id="var-del-setting.21"><h3>del-setting!</h3><div class="usage"><code>(del-setting! db user-id)</code><code>(del-setting! db user-id setting-id)</code><code>(del-setting! db user-id setting-id & setting-ids)</code></div><div class="doc"><div class="markdown"><p>Deletes one or more settings for a given user from a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L220">view source</a></div></div><div class="public anchor" id="var-email"><h3>email</h3><div class="usage"><code>(email db user-identity)</code><code>(email db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns an e-mail of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1302">view source</a></div></div><div class="public anchor" id="var-existing"><h3>existing</h3><div class="usage"><code>(existing db user-identity)</code><code>(existing db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>Returns user identity record (of type <code>amelinium.Identity</code>) if a user specified by the given <code>user-identity</code> with optional <code>identity-type</code> exists. Otherwise it returns <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L592">view source</a></div></div><div class="public anchor" id="var-exists.3F"><h3>exists?</h3><div class="usage"><code>(exists? db user-identity)</code><code>(exists? db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>Returns <code>true</code> if a user specified by the given <code>user-identity</code> with optional <code>identity-type</code> exists. Returns <code>false</code> otherwise.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L584">view source</a></div></div><div class="public anchor" id="var-find-id"><h3>find-id</h3><div class="usage"><code>(find-id db user-spec)</code></div><div class="doc"><div class="markdown"><p>Gets user ID on a basis of a map with <code>:id</code> key or on a basis of a map with <code>:uid</code> key or on a basis of a number, a string or a keyword being ID, email, phone or UID. User must exist in a database. Uses cached properties if possible.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1183">view source</a></div></div><div class="public anchor" id="var-first-name"><h3>first-name</h3><div class="usage"><code>(first-name db user-identity)</code><code>(first-name db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a first name of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1214">view source</a></div></div><div class="public anchor" id="var-generate-password"><h3>generate-password</h3><div class="usage"><code>(generate-password auth-config password)</code></div><div class="doc"><div class="markdown"><p>Creates a password for the given authentication config. Returns a map of shared part ID and an intrinsic part as two keys: <code>password-suite-id</code> and <code>:password</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L981">view source</a></div></div><div class="public anchor" id="var-get-id"><h3>get-id</h3><div class="usage"><code>(get-id db user-identity)</code><code>(get-id db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>Takes a user identity <code>user-identity</code> and a database connectable object and returns a numerical user ID (not cached). Optional identity type will constrain the identity to be treated as it will be of certain type.</p>
<p>This function is using <code>query-id</code> to perform the actual query on a database using identity record created with <code>amelinium.identify/of</code> or <code>amelinium.identity/of-type</code>.</p>
<p>This function is used by cache-backed functions <code>id</code>, <code>id-of</code>, <code>trusted-id</code> and <code>trusted-id-of</code> to communicate with a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L410">view source</a></div></div><div class="public anchor" id="var-get-ids"><h3>get-ids</h3><div class="usage"><code>(get-ids db user-identities)</code><code>(get-ids db identity-type user-identities)</code></div><div class="doc"><div class="markdown"><p>Takes user identities and a database connectable object, and returns a numerical user IDs (not cached). Optional identity type will constrain the identity to be treated as it will be of certain type. Returns a map with <code>amelinium.Identity</code> objects as keys and numerical identifiers as values.</p>
<p>This function is using <code>query-ids</code> to perform the actual query on a database using identity records created with <code>amelinium.identify/of</code> or <code>amelinium.identity/of-type</code>.</p>
<p>This function is used by cache-backed functions <code>ids</code>, <code>ids-of</code>, <code>trusted-ids</code> and <code>trusted-ids-of</code> to communicate with a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L442">view source</a></div></div><div class="public anchor" id="var-get-login-data"><h3>get-login-data</h3><div class="usage"><code>(get-login-data auth-source email)</code><code>(get-login-data auth-source email account-type)</code></div><div class="doc"><div class="markdown"><p>Returns data required for user to log in, including password information.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L914">view source</a></div></div><div class="public anchor" id="var-get-password-suites"><h3>get-password-suites</h3><div class="usage"><code>(get-password-suites auth-source email)</code><code>(get-password-suites auth-source email account-type)</code></div><div class="doc"><div class="markdown"><p>Returns password information.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L921">view source</a></div></div><div class="public anchor" id="var-get-setting"><h3>get-setting</h3><div class="usage"><code>(get-setting db user-id setting-id)</code></div><div class="doc"><div class="markdown"><p>Gets user setting and de-serializes it to a Clojure data structure.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L208">view source</a></div></div><div class="public anchor" id="var-get-shared-suite"><h3>get-shared-suite</h3><div class="usage"><code>(get-shared-suite db suite-id)</code></div><div class="doc"><div class="markdown"><p>Gets shared suite by its ID as a JSON string.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L960">view source</a></div></div><div class="public anchor" id="var-get-shared-suite-id"><h3>get-shared-suite-id</h3><div class="usage"><code>(get-shared-suite-id db suite)</code></div><div class="doc"><div class="markdown"><p>Gets shared suite ID on a basis of its JSON content. If the value of <code>suite</code> is a fixed-precision integer, it is returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L950">view source</a></div></div><div class="public anchor" id="var-get-user-by-email"><h3>get-user-by-email</h3><div class="usage"><code>(get-user-by-email db email)</code></div><div class="doc"><div class="markdown"><p>Given an email, returns the user data in a form of lazy map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L183">view source</a></div></div><div class="public anchor" id="var-get-user-by-id"><h3>get-user-by-id</h3><div class="usage"><code>(get-user-by-id db id)</code></div><div class="doc"><div class="markdown"><p>Given a user ID, returns the user data in a form of lazy map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L177">view source</a></div></div><div class="public anchor" id="var-get-user-by-uid"><h3>get-user-by-uid</h3><div class="usage"><code>(get-user-by-uid db uid)</code></div><div class="doc"><div class="markdown"><p>Given a database connectable object <code>db</code> and a UID <code>uid</code>, returns the user data in a form of lazy map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L189">view source</a></div></div><div class="public anchor" id="var-hard-locked"><h3>hard-locked</h3><div class="usage"><code>(hard-locked db user-identity)</code><code>(hard-locked db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a time of the account’s hard-lock (if any). Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1278">view source</a></div></div><div class="public anchor" id="var-hard-locked"><h3>hard-locked</h3><div class="usage"><code>(hard-locked db user-identity)</code><code>(hard-locked db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a time of the account’s hard-lock (if any). Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1278">view source</a></div></div><div class="public anchor" id="var-id"><h3>id</h3><div class="usage"><code>(id db user-identity)</code><code>(id db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>Takes a user identity, optional identity type and a database connectable object, and returns a numerical user ID (cached).</p>
<p>Optional identity type will constrain the identity to be treated as it will be of certain type.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L501">view source</a></div></div><div class="public anchor" id="var-id-of"><h3>id-of</h3><div class="usage"><code>(id-of identity-type db user-identity)</code></div><div class="doc"><div class="markdown"><p>Like <code>id</code> but <code>identity-type</code> is a first argument.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L513">view source</a></div></div><div class="public anchor" id="var-identity-cache"><h3>identity-cache</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L62">view source</a></div></div><div class="public anchor" id="var-ids"><h3>ids</h3><div class="usage"><code>(ids db user-identities)</code><code>(ids db identity-type user-identities)</code></div><div class="doc"><div class="markdown"><p>Takes user identities, optional identity type and a database connectable object, and returns a map with <code>amelinium.Identity</code> keys and numerical user IDs values (cached).</p>
<p>Optional identity type will constrain the identities to be treated as they will be of certain type.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L541">view source</a></div></div><div class="public anchor" id="var-ids-of"><h3>ids-of</h3><div class="usage"><code>(ids-of identity-type db user-identities)</code></div><div class="doc"><div class="markdown"><p>Like <code>ids</code> but <code>identity-type</code> is a first argument.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L553">view source</a></div></div><div class="public anchor" id="var-insert-shared-suite-query"><h3>insert-shared-suite-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L928">view source</a></div></div><div class="public anchor" id="var-last-attempt"><h3>last-attempt</h3><div class="usage"><code>(last-attempt db user-identity)</code><code>(last-attempt db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a time of last log-in attempt of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1257">view source</a></div></div><div class="public anchor" id="var-last-failed-ip"><h3>last-failed-ip</h3><div class="usage"><code>(last-failed-ip db user-identity)</code><code>(last-failed-ip db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a last IP address from which the user has failed to log in successfully. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1249">view source</a></div></div><div class="public anchor" id="var-last-login"><h3>last-login</h3><div class="usage"><code>(last-login db user-identity)</code><code>(last-login db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a time of last successful log-in of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1264">view source</a></div></div><div class="public anchor" id="var-last-name"><h3>last-name</h3><div class="usage"><code>(last-name db user-identity)</code><code>(last-name db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a last name of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1221">view source</a></div></div><div class="public anchor" id="var-last-ok-ip"><h3>last-ok-ip</h3><div class="usage"><code>(last-ok-ip db user-identity)</code><code>(last-ok-ip db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a last IP address from which the user has logged in successfully. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1242">view source</a></div></div><div class="public anchor" id="var-login-attempts"><h3>login-attempts</h3><div class="usage"><code>(login-attempts db user-identity)</code><code>(login-attempts db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a number of login attempts of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1235">view source</a></div></div><div class="public anchor" id="var-login-data-queries"><h3>login-data-queries</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L845">view source</a></div></div><div class="public anchor" id="var-login-failed-update-query"><h3>login-failed-update-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1022">view source</a></div></div><div class="public anchor" id="var-login-query"><h3>login-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L826">view source</a></div></div><div class="public anchor" id="var-login-query-atypes-post"><h3>login-query-atypes-post</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L836">view source</a></div></div><div class="public anchor" id="var-login-query-atypes-pre"><h3>login-query-atypes-pre</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L831">view source</a></div></div><div class="public anchor" id="var-login-query-atypes-single"><h3>login-query-atypes-single</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L839">view source</a></div></div><div class="public anchor" id="var-make-user-data"><h3>make-user-data</h3><div class="usage"><code>(make-user-data auth-settings params)</code></div><div class="doc"><div class="markdown"><p>Creates user data record by getting values from the given authentication settings and parameters map. If <code>:password</code> parameter is present it will make JSON password suite.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L138">view source</a></div></div><div class="public anchor" id="var-make-user-data-simple"><h3>make-user-data-simple</h3><div class="usage"><code>(make-user-data-simple auth-settings params)</code></div><div class="doc"><div class="markdown"><p>Creates simple user data record (only db, phone and email) by getting values from the given authentication settings and parameters map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L163">view source</a></div></div><div class="public anchor" id="var-make-user-password"><h3>make-user-password</h3><div class="usage"><code>(make-user-password auth-src password)</code><code>(make-user-password auth-src password account-type)</code></div><div class="doc"><div class="markdown"><p>Creates user password (of type <code>PasswordData</code>) on a basis of authentication source <code>auth-src</code>, a plain password string <code>password</code> and optional account type <code>account-type</code>.</p>
<p>Authentication source can be a request map, <code>AuthSettings</code> record or <code>AuthConfig</code> record. If this is a request map then authentication settings are looked up under the <code>:auth/setup</code> key.</p>
<p>The <code>account-type</code> argument is used to select authentication configuration (of type <code>AuthConfig</code>) specific to a user from the given or obtained authentication settings.</p>
<p>If <code>account-type</code> argument is not given and the given authentication source is not of type <code>AuthConfig</code> then the default authentication configuration associated with detected authentication settings is used.</p>
<p>If <code>account-type</code> argument is not given or is set to <code>nil</code> or <code>false</code>, and the given authentication source is already of type <code>AuthConfig</code> then it has no impact on the authentication configuration being used.</p>
<p>If <code>account-type</code> argument is given and is not <code>nil</code> or <code>false</code>, and the given authentication source is already of type <code>AuthConfig</code> then it will be used only if it is configured to handle the given account type. If it is does not, password data record with <code>nil</code> values associated with each field is returned.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L101">view source</a></div></div><div class="public anchor" id="var-middle-name"><h3>middle-name</h3><div class="usage"><code>(middle-name db user-identity)</code><code>(middle-name db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a middle name of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1228">view source</a></div></div><div class="public anchor" id="var-password-data-queries"><h3>password-data-queries</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L851">view source</a></div></div><div class="public anchor" id="var-password-query"><h3>password-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L810">view source</a></div></div><div class="public anchor" id="var-password-query-atypes-post"><h3>password-query-atypes-post</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L818">view source</a></div></div><div class="public anchor" id="var-password-query-atypes-pre"><h3>password-query-atypes-pre</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L814">view source</a></div></div><div class="public anchor" id="var-password-query-atypes-single"><h3>password-query-atypes-single</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L821">view source</a></div></div><div class="public anchor" id="var-phone"><h3>phone</h3><div class="usage"><code>(phone db user-identity)</code><code>(phone db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a phone number of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1309">view source</a></div></div><div class="public anchor" id="var-prepare-password-suites"><h3>prepare-password-suites</h3><div class="usage"><code>(prepare-password-suites db suites)</code><code>(prepare-password-suites db shared-suite user-suite)</code></div><div class="doc"><div class="markdown"><p>Creates a password suites without saving it into a database. Uses database to store the given, shared password suite if it does not exist yet. Returns a map with two keys: <code>:password</code> (JSON-encoded password ready to be saved into a database which should be given as an argument) and <code>:password-suite-id</code> (integer identifier of a shared suite ID which exists on a database).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L967">view source</a></div></div><div class="public anchor" id="var-prop"><h3>prop</h3><div class="usage"><code>(prop db prop-id user-identity)</code><code>(prop db prop-id user-identity & identities)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code>, property identifier <code>prop-id</code>, and identifiable object <code>user-identity</code>, returns user’s property. If multiple identities are given, returns a map of <code>amelinium.Identity</code> records associated with selected property values. (cached)</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L666">view source</a></div></div><div class="public anchor" id="var-prop-by-id"><h3>prop-by-id</h3><div class="usage"><code>(prop-by-id db prop-id user-id)</code><code>(prop-by-id db prop-id user-id & ids)</code></div><div class="doc"><div class="markdown"><p>Returns user property <code>prop-id</code> for the given user ID <code>user-id</code> or a map of user properties keyed with their IDs if multiple IDs are given (cached).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L305">view source</a></div></div><div class="public anchor" id="var-prop-by-id-or-default"><h3>prop-by-id-or-default</h3><div class="usage"><code>(prop-by-id-or-default db prop default id)</code><code>(prop-by-id-or-default db prop default id & ids)</code></div><div class="doc"><div class="markdown"><p>Returns user property <code>prop</code> for the given user ID <code>id</code> or a map of user property keyed with its ID if multiple IDs are given (cached). If the property is not found the default value, given as <code>default</code>, is returned instead of <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L326">view source</a></div></div><div class="public anchor" id="var-prop-by-ids"><h3>prop-by-ids</h3><div class="usage"><code>(prop-by-ids db prop-id ids)</code></div><div class="doc"><div class="markdown"><p>Returns property <code>prop-id</code> for the given user IDs <code>ids</code> (cached).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L321">view source</a></div></div><div class="public anchor" id="var-prop-cols"><h3>prop-cols</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L251">view source</a></div></div><div class="public anchor" id="var-prop-del"><h3>prop-del</h3><div class="usage"><code>(prop-del db user-id k)</code></div><div class="doc"><div class="markdown"><p>Deletes property of a user with the given ID <code>user-id</code> by setting it to <code>nil</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L298">view source</a></div></div><div class="public anchor" id="var-prop-get-locked"><h3>prop-get-locked</h3><div class="usage"><code>(prop-get-locked db user-id)</code><code>(prop-get-locked db user-id & ids)</code></div><div class="doc"><div class="markdown"><p>Using the database connectable object <code>db</code>, returns the hard-lock status for the user account of the given ID <code>user-id</code>. Uses cached property.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1175">view source</a></div></div><div class="public anchor" id="var-prop-get-roles"><h3>prop-get-roles</h3><div class="usage"><code>(prop-get-roles smap-or-user-id opts context)</code><code>(prop-get-roles smap-or-user-id opts)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L198">view source</a></div></div><div class="public anchor" id="var-prop-of"><h3>prop-of</h3><div class="usage"><code>(prop-of identity-type db prop-id user-identity)</code><code>(prop-of identity-type db prop-id user-identity & identities)</code></div><div class="doc"><div class="markdown"><p>For the given identity type <code>identity-type</code>, database connectable object <code>db</code>, property identifier <code>prop-id</code>, and identifiable object <code>user-identity</code>, returns user’s property. If multiple identities are given, returns a map of <code>amelinium.Identity</code> records associated with selected property values. Identity type(s) must be of the given type. (cached)</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L676">view source</a></div></div><div class="public anchor" id="var-prop-set"><h3>prop-set</h3><div class="usage"><code>(prop-set db user-id k v)</code></div><div class="doc"><div class="markdown"><p>Sets property <code>k</code> of a user identified with the given ID <code>user-id</code> to value <code>v</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L292">view source</a></div></div><div class="public anchor" id="var-props"><h3>props</h3><div class="usage"><code>(props db user-identity)</code><code>(props db user-identity & identities)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and identifiable object <code>user-identity</code>, returns user’s properties as a map. If multiple identities are given, returns a sequence of maps. (cached)</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L627">view source</a></div></div><div class="public anchor" id="var-props-by-id"><h3>props-by-id</h3><div class="usage"><code>(props-by-id db user-id)</code><code>(props-by-id db user-id & ids)</code></div><div class="doc"><div class="markdown"><p>Returns user properties for the given user ID <code>user-id</code> (cached).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L336">view source</a></div></div><div class="public anchor" id="var-props-by-ids"><h3>props-by-ids</h3><div class="usage"><code>(props-by-ids db ids)</code></div><div class="doc"><div class="markdown"><p>Returns user properties for each of the given user IDs <code>ids</code> (cached).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L348">view source</a></div></div><div class="public anchor" id="var-props-cache"><h3>props-cache</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L60">view source</a></div></div><div class="public anchor" id="var-props-del"><h3>props-del</h3><div class="usage"><code>(props-del db user-id)</code></div><div class="doc"><div class="markdown"><p>Deletes all properties of a user identified with the given ID <code>user-id</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L286">view source</a></div></div><div class="public anchor" id="var-props-of"><h3>props-of</h3><div class="usage"><code>(props-of identity-type db user-identity)</code><code>(props-of identity-type db user-identity & identities)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code>, identity type <code>identity-type</code> and identifiable object <code>user-identity</code>, returns user’s properties as a map. If multiple identities are given, returns a map keyed with <code>amelinium.Identity</code> records. The given identity must be of the given type. (cached)</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L636">view source</a></div></div><div class="public anchor" id="var-props-set"><h3>props-set</h3><div class="usage"><code>(props-set db user-id keys-vals)</code></div><div class="doc"><div class="markdown"><p>Sets properties of a user identified with the given ID <code>user-id</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L280">view source</a></div></div><div class="public anchor" id="var-put-setting.21"><h3>put-setting!</h3><div class="usage"><code>(put-setting! db user-id setting-id value)</code><code>(put-setting! db user-id setting-id value & pairs)</code></div><div class="doc"><div class="markdown"><p>Stores one or more settings of the given user in a database. Maximum object size is 32 KB.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L213">view source</a></div></div><div class="public anchor" id="var-query-id"><h3>query-id</h3><h4 class="type">multimethod</h4><div class="usage"><code>(query-id db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>Performs an ID-getting query for the given identity and identity type (must be a keyword). This method is used to get user ID for the given identity of a known type.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L381">view source</a></div></div><div class="public anchor" id="var-query-id-std"><h3>query-id-std</h3><div class="usage"><code>(query-id-std db colspec query user-identity)</code></div><div class="doc"><div class="markdown"><p>Converts the given user identity <code>user-identity</code> to a database-suitable value and then performs a SQL query <code>query</code> with the obtained value as a parameter. Returns query result as vector. This is a standard querying function applicable to many simple database schemas. Used primarily as a default operation in method definitions of <code>query-id</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L399">view source</a></div></div><div class="public anchor" id="var-query-ids"><h3>query-ids</h3><h4 class="type">multimethod</h4><div class="usage"><code>(query-ids db identity-type user-identities)</code></div><div class="doc"><div class="markdown"><p>Performs a multiple IDs-getting SQL query for the given identity and identity type (must be a keyword). This method is used to get user IDs for the given identities of known types.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L390">view source</a></div></div><div class="public anchor" id="var-query-ids-std"><h3>query-ids-std</h3><div class="usage"><code>(query-ids-std db colspec query user-identities)</code></div><div class="doc"><div class="markdown"><p>Converts the given user identities <code>user-identities</code> to a database-suitable values and then performs a SQL query <code>query</code> with the obtained value as parameters added using “IN(…)” clause. Returns query result as vector. Used primarily as a default operation in method definitions of <code>query-ids</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L430">view source</a></div></div><div class="public anchor" id="var-seq-prop"><h3>seq-prop</h3><div class="usage"><code>(seq-prop db prop-id user-identities)</code><code>(seq-prop db prop-id identity-type user-identities)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code>, property identifier <code>prop-id</code>, optional identity type <code>identity-type</code> and identifiable objects <code>user-identities</code>, returns a map of <code>amelinium.Identity</code> records associated with selected property values. Each given identity must be of the given type if <code>identity-type</code> is used. (cached)</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L646">view source</a></div></div><div class="public anchor" id="var-seq-prop-by-id"><h3>seq-prop-by-id</h3><div class="usage"><code>(seq-prop-by-id db prop-id user-ids)</code></div><div class="doc"><div class="markdown"><p>Returns user property <code>prop-id</code> for the given user IDs <code>user-ids</code> (cached).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L315">view source</a></div></div><div class="public anchor" id="var-seq-prop-of"><h3>seq-prop-of</h3><div class="usage"><code>(seq-prop-of identity-type db prop-id user-identities)</code></div><div class="doc"><div class="markdown"><p>The same as <code>seq-prop</code> but <code>identity-type</code> is a mandatory first argument. (cached)</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L661">view source</a></div></div><div class="public anchor" id="var-seq-props"><h3>seq-props</h3><div class="usage"><code>(seq-props db identity-type user-identities)</code><code>(seq-props db user-identities)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code>, optional identity type <code>identity-type</code> and identifiable object <code>user-identity</code>, returns users’ properties as map keyed with <code>amelinium.Identity</code> records. The given identities must be of the given type if the type is given. (cached)</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L605">view source</a></div></div><div class="public anchor" id="var-seq-props-by-id"><h3>seq-props-by-id</h3><div class="usage"><code>(seq-props-by-id db ids)</code></div><div class="doc"><div class="markdown"><p>Returns user properties for each of the given user IDs <code>ids</code> (cached).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L343">view source</a></div></div><div class="public anchor" id="var-session"><h3>session</h3><div class="usage"><code>(session db user-identity)</code><code>(session db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a session of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
<p>Be aware that this operation will only work if the identity type is a session. There is no parsing of session ID, nor getting it from a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1323">view source</a></div></div><div class="public anchor" id="var-setting"><h3>setting</h3><div class="usage"><code>(setting db user-id setting-id)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L229">view source</a></div></div><div class="public anchor" id="var-setting-del"><h3>setting-del</h3><div class="usage"><code>(setting-del db user-id)</code><code>(setting-del db user-id setting-id)</code><code>(setting-del db user-id setting-id & more)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L240">view source</a></div></div><div class="public anchor" id="var-setting-set"><h3>setting-set</h3><div class="usage"><code>(setting-set db user-id setting-id value)</code><code>(setting-set db user-id setting-id value & pairs)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L233">view source</a></div></div><div class="public anchor" id="var-settings-cache"><h3>settings-cache</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L61">view source</a></div></div><div class="public anchor" id="var-shared-suite-by-id-query"><h3>shared-suite-by-id-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L937">view source</a></div></div><div class="public anchor" id="var-shared-suite-query"><h3>shared-suite-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L934">view source</a></div></div><div class="public anchor" id="var-soft-lock-update-query"><h3>soft-lock-update-query</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1034">view source</a></div></div><div class="public anchor" id="var-soft-locked"><h3>soft-locked</h3><div class="usage"><code>(soft-locked db user-identity)</code><code>(soft-locked db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a time of the account’s soft-lock (if any). Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1271">view source</a></div></div><div class="public anchor" id="var-trusted-id"><h3>trusted-id</h3><div class="usage"><code>(trusted-id db user-identity)</code><code>(trusted-id db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>Takes a user identity, optional identity type and a database connectable object, and returns a numerical user ID (cached).</p>
<p>When the given identity is of type <code>:id</code> (a numerical identifier), it will NOT interact with a database but simply trust that the ID exists and will simply return it.</p>
<p>Optional identity type will constrain the identity to be treated as it will be of certain type.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L519">view source</a></div></div><div class="public anchor" id="var-trusted-id-of"><h3>trusted-id-of</h3><div class="usage"><code>(trusted-id-of identity-type db user-identity)</code></div><div class="doc"><div class="markdown"><p>Like <code>trusted-id</code> but <code>identity-type</code> is a first argument.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L535">view source</a></div></div><div class="public anchor" id="var-trusted-ids"><h3>trusted-ids</h3><div class="usage"><code>(trusted-ids db user-identities)</code><code>(trusted-ids db identity-type user-identities)</code></div><div class="doc"><div class="markdown"><p>Takes user identities, optional identity type and a database connectable object, and returns a map with <code>amelinium.Identity</code> keys and numerical user IDs values (cached).</p>
<p>When any of the given identities is of type <code>:id</code> (a numerical identifier), it will NOT interact with a database to get the ID but simply trust that this ID exists and will simply put it into a map.</p>
<p>Optional identity type will constrain the identities to be treated as they will be of certain type.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L559">view source</a></div></div><div class="public anchor" id="var-trusted-ids-of"><h3>trusted-ids-of</h3><div class="usage"><code>(trusted-ids-of identity-type db user-identities)</code></div><div class="doc"><div class="markdown"><p>Like <code>trusted-ids</code> but <code>identity-type</code> is a first argument.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L576">view source</a></div></div><div class="public anchor" id="var-uid"><h3>uid</h3><div class="usage"><code>(uid db user-identity)</code><code>(uid db identity-type user-identity)</code></div><div class="doc"><div class="markdown"><p>For the given database connectable object <code>db</code> and user identity <code>user-identity</code> returns a UID of the existing user. Optional <code>identity-type</code> can be given to constrain the given identity.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1316">view source</a></div></div><div class="public anchor" id="var-update-identity"><h3>update-identity</h3><div class="usage"><code>(update-identity identity-type db token code user-identity)</code><code>(update-identity identity-type db code user-identity)</code><code>(update-identity identity-type db token nil)</code><code>(update-identity identity-type db token)</code></div><div class="doc"><div class="markdown"><p>Updates user’s identity identified by <code>user-identity</code> and <code>code</code>, or by <code>token</code>. Code or token must exist in a database.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L790">view source</a></div></div><div class="public anchor" id="var-update-identity-query-code"><h3>update-identity-query-code</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L767">view source</a></div></div><div class="public anchor" id="var-update-identity-query-token"><h3>update-identity-query-token</h3><div class="usage"></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L746">view source</a></div></div><div class="public anchor" id="var-update-identity-with-code"><h3>update-identity-with-code</h3><div class="usage"><code>(update-identity-with-code identity-type db code user-identity)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L778">view source</a></div></div><div class="public anchor" id="var-update-identity-with-token"><h3>update-identity-with-token</h3><div class="usage"><code>(update-identity-with-token identity-type db token)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L756">view source</a></div></div><div class="public anchor" id="var-update-login-failed"><h3>update-login-failed</h3><div class="usage"><code>(update-login-failed auth-config user-id ip-address)</code><code>(update-login-failed db user-id ip-address max-attempts attempt-expires-after-secs)</code></div><div class="doc"><div class="markdown"><p>Updates <code>users</code> table with failed login data (attempts, IP address) according to authentication configuration and sets a soft lock if a number of attempts exceeded the configured value.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1040">view source</a></div></div><div class="public anchor" id="var-update-login-ok"><h3>update-login-ok</h3><div class="usage"><code>(update-login-ok db id ip)</code></div><div class="doc"><div class="markdown"></div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L1011">view source</a></div></div><div class="public anchor" id="var-update-password"><h3>update-password</h3><div class="usage"><code>(update-password db id suites)</code><code>(update-password db id shared-suite user-suite)</code></div><div class="doc"><div class="markdown"><p>Updates password information for the given user by updating suite ID and intrinsic password in an authorization database. Additionally <code>:last_attempt</code> and <code>:last_failed_ip</code> properties are deleted and <code>:login_attempts</code> is set to 0.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/amelinium/tree/1.0.1/src/amelinium/model/user.clj#L992">view source</a></div></div></div></body></html>