- ok ~title:"Logged in" ~buttons:[ok_button redirect] ~cookie
- q ("Welcome " ^ username ^ "." ^
- if force_password_change then " Please change your password now."
- else "")
- with
- Not_found ->
- error
- ~title:"Bad name or password"
- ~back_button:true
- q "The name or password was wrong."
+ let ok_button = ok_button redirect in
+ let buttons =
+ if redirect <> "/" && redirect <> "/index" then (
+ ok_button ::
+ [ { Template.StdPages.label = " Home Page ";
+ Template.StdPages.link = "/";
+ Template.StdPages.method_ = None;
+ Template.StdPages.params = [] } ]
+ ) else [ ok_button ] in
+
+ ok ~title:"Logged in" ~buttons ~cookie
+ dbh hostid q
+ ("Welcome " ^ username ^ "." ^
+ if force_password_change then " Please change your password now."
+ else "")