From 8a020c6161c496ad11eb6c92bfbe41943349cef9 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Fri, 4 Jul 2008 20:30:00 +0000 Subject: Modified logon and password to use new redirect_to_referrer functionality. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1279 ab2d0c66-481e-0410-8bed-d214d4d58bed --- app/acf-util/password-controller.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'app/acf-util/password-controller.lua') diff --git a/app/acf-util/password-controller.lua b/app/acf-util/password-controller.lua index 9ad8e04..b248808 100755 --- a/app/acf-util/password-controller.lua +++ b/app/acf-util/password-controller.lua @@ -24,10 +24,12 @@ function editme(self) -- Update userinfo output = self.model.update_user(self, output) - if not output.errtxt then output.descr = "Saved user" end + output = self:redirect_to_referrer(output) + else + output = self:redirect_to_referrer() or output end -- Don't allow changing of roles for yourself @@ -53,11 +55,12 @@ function edituser(self) -- Update userinfo output = self.model.update_user(self, output) - - -- result if not output.errtxt then redirect(self, "status") end + output = self:redirect_to_referrer(output) + else + output = self:redirect_to_referrer() or output end output.type = "form" @@ -77,11 +80,12 @@ function newuser(self) -- Update userinfo output = self.model.create_user(self, output) - - -- result if not output.errtxt then redirect(self, "status") end + output = self:redirect_to_referrer(output) + else + output = self:redirect_to_referrer() or output end output.type = "form" @@ -91,6 +95,5 @@ function newuser(self) end function deleteuser(self) - self.model.delete_user(self, self.clientdata.userid) - redirect(self, "status") + return self:redirect_to_referrer(self.model.delete_user(self, self.clientdata.userid)) end -- cgit v1.2.3