summaryrefslogtreecommitdiffstats
path: root/lib/authenticator.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-10-06 12:57:42 +0000
committerTed Trask <ttrask01@yahoo.com>2010-10-06 12:57:42 +0000
commit25c09923e08f664a0c791f27d521fb13f4d5d74c (patch)
tree6410b0964cdbbd2603b9598f8474b5a9333be520 /lib/authenticator.lua
parentb202af98292d6d7b5053e5a934b916153ce89af9 (diff)
downloadacf-core-25c09923e08f664a0c791f27d521fb13f4d5d74c.tar.bz2
acf-core-25c09923e08f664a0c791f27d521fb13f4d5d74c.tar.xz
Added home page (action) to user parameters and redirect there after login
Moved get_all_permissions function from acf-util/roles-model to lib/roles
Diffstat (limited to 'lib/authenticator.lua')
-rw-r--r--lib/authenticator.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/authenticator.lua b/lib/authenticator.lua
index 95eb3d7..724b854 100644
--- a/lib/authenticator.lua
+++ b/lib/authenticator.lua
@@ -37,6 +37,7 @@ local parse_entry = function(id, entry)
a.username = fields[2] or ""
a.roles = fields[3] or ""
a.skin = fields[4] or ""
+ a.home = fields[5] or ""
authstruct[id] = a
end
return a
@@ -106,14 +107,15 @@ write_userinfo = function(self, userinfo)
return false
end
id = get_id(self, userinfo.userid) or {}
- -- Username, password, roles, skin are allowed to not exist, just leave the same
+ -- Username, password, roles, skin, home are allowed to not exist, just leave the same
id.userid = userinfo.userid
if userinfo.username then id.username = userinfo.username end
if userinfo.password then id.password = md5.sumhexa(userinfo.password) end
if userinfo.roles then id.roles = table.concat(userinfo.roles, ",") end
if userinfo.skin then id.skin = userinfo.skin end
+ if userinfo.home then id.home = userinfo.home end
- local success = auth.write_entry(self, usertable, "", id.userid, (id.password or "")..":"..(id.username or "")..":"..(id.roles or "")..":"..(id.skin or ""))
+ local success = auth.write_entry(self, usertable, "", id.userid, (id.password or "")..":"..(id.username or "")..":"..(id.roles or "")..":"..(id.skin or "")..":"..(id.home or ""))
authstruct[userinfo.userid] = nil
get_id(self, id.userid)