Added logout. Removed magical routing.
[zzz-floof.git] / floof / controllers / account.py
index 0c53a6d..e4f39f3 100644 (file)
@@ -72,6 +72,17 @@ class AccountController(BaseController):
         # XXX send me where I came from
         redirect_to('/')
 
+    def logout(self):
+        """Log user out."""
+
+        if 'user_id' in session:
+            del session['user_id']
+            session.save()
+
+        # XXX success message
+        # XXX send me where I came from
+        redirect_to('/')
+
     def register(self):
         """Logging in with an unrecognized identity URL redirects here."""