PacketFence
Bug Tracking System

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000876PacketFencecorepublic2009-12-10 17:212012-08-29 15:28
Reporterobilodeau 
Assigned Toobilodeau 
PriorityhighSeverityfeatureReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.0.0 
Summary0000876: simplify registration / login process
DescriptionMost of the users only want ONE page with info and login / password fields for registration or login.

Right now that's not easy to do. It should become the default and keep the multiple pages registration pages in optional config.

Right now the way to do it is:

Basically, check in lib/pf/web.pm, there are two subs:

generate_registration_page
generate_login_page

and these are called from cgi-bin/register.cgi.

Now, your goal is to skip generate_registration_page.

Add the following line to html/user/content/templates/login.html anywhere between <form..>...</form> 
tags:
<input type="hidden" name="mode" value="register">

and patch cgi-bin/register.cgi with:
--- pf/cgi-bin/register.cgi    9ad54d294120b0f8e3e63c6e6f36109679e9f41d
+++ pf/cgi-bin/register.cgi    18c03de41b3c6625fc52baf268de167585375c02
@@ -145,5 +145,5 @@ if (defined($params{'mode'})) {
     generate_error_page($cgi, $session, "error: incorrect mode");
   }
 } else {
-  generate_registration_page($cgi, $session, $destination_url, $mac,1);
+  generate_login_page($cgi, $session, $ENV{REQUEST_URI}, $destination_url, $err);
 }

This should do the trick but note that I have not tested it and something might be missing. 

excerpt from an email I sent on the mailing list today
TagsNo tags attached.
fixed in git revision
fixed in mtn revision
Attached Files

- Relationships

-  Notes
(0002988)
obilodeau (reporter)
2012-08-29 15:28

Fixed a long time ago when we revamped the templates. One template is the default behavior since then.

- Issue History
Date Modified Username Field Change
2009-12-10 17:21 obilodeau New Issue
2009-12-10 17:21 obilodeau Status new => assigned
2009-12-10 17:21 obilodeau Assigned To => obilodeau
2011-01-18 12:02 obilodeau Target Version => 2.1.0
2011-03-03 15:15 obilodeau Target Version 2.1.0 => +1
2011-03-03 15:18 obilodeau Target Version +1 => +2
2012-02-29 10:58 obilodeau Category future => core
2012-08-29 15:28 obilodeau Note Added: 0002988
2012-08-29 15:28 obilodeau Status assigned => resolved
2012-08-29 15:28 obilodeau Fixed in Version => 3.0.0
2012-08-29 15:28 obilodeau Resolution open => fixed
2012-08-29 15:28 obilodeau Target Version +2 =>
2012-08-29 15:28 obilodeau Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker