Issue Details (XML | Word | Printable)

Key: SQ-326
Type: Improvement Improvement
Status: Open Open
Priority: Normal Normal
Assignee: Unassigned
Reporter: teefal
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
squeakland

signup within etoys

Created: 04/Sep/09 11:33 AM   Updated: 06/Sep/10 06:49 AM
Component/s: etoys
Fix Version/s: future release

Time Tracking:
Not Specified

Issue Links:
Related
 


 Description  « Hide
A button on the login box that said "Signup" (it's free!), which led to a dialog box that had:

Username

Password

Password Again

First Name

Last Name

Email

Tell us about yourself (with text box)


--- java code that does the signup (translate to squeak) --

    public static boolean doWebCreateAccount( String pHost, String pUsername, String pPassword,
                                              String pEmail )
    {
        boolean aResult = false;

        String aPostUrl = HTTP_HEADER + pHost + "/action/accountSave";

        PostMethod aMethod = new PostMethod( aPostUrl );
        aMethod.addParameter( "username", pUsername );
        aMethod.addParameter( "password", pPassword );
        aMethod.addParameter( "passwordTwo", pPassword ); // add passwordTwo field to box (to Storymill jsp? asks Jon)
        aMethod.addParameter( "email", pEmail );

        try
        {
            int aStatus = getHttpClient().executeMethod( aMethod );

            String respBody = aMethod.getResponseBodyAsString(); // required, though not used

            Header aLocationHeader = aMethod.getResponseHeader( "Location" );
            String aRedirectUri = ( aLocationHeader != null ) ? aLocationHeader.toString() : null;

            aResult = ( ( aStatus == HttpStatus.SC_MOVED_TEMPORARILY ) && ( aRedirectUri !=
                        null ) && ( aRedirectUri.indexOf( "accountSaved" ) >= 0 ) );
        }
        catch ( IOException e ) // This can happen with no network connection
        {
            aResult = false;
        }
        finally
        {

            if ( aMethod != null ) aMethod.releaseConnection();
        }

        return aResult;
    }

----

Note that you can add these fields to the above (with this spelling & capitalization):

firstName

lastName

comment

(last one is for "Tell us about yourself")



Yoshiki Ohshima added a comment - 04/Sep/09 01:29 PM
Hmm, where are the checks like there is already the user of same name, password is too easy, etc.? We already have been putting out "beta" and adding a new feature like this at this point may not be justified.

Bert Freudenberg added a comment - 10/Sep/09 02:15 AM
For the record, you're not "much out of the decision making process". If the work does not get done, it will not be in the release, that simple ;)

I thought providing a link to the web site account creation was much simpler than implementing this on our own, so this is precisely to make the complex work in SQ-326 unnecessary.

Yoshiki Ohshima added a comment - 10/Sep/09 07:55 AM
Maybe you meant to write it to SQ-354, but sure, the browser approach is better than doing this in Squeak. Launching one from Squeak is even desirable. And, from Squeak or not, we do need a page on the server anyway so it wouldn't change the work load much (I felt there may be more work but not necessarily).

But still I'd prefer to have a really usable working Showcase in the release where people needs to sign up by opening the page manually (and that sign up page can come later than the release, actually) rather than not very well functioning showcase, with not very well functioning sign up page.

Yoshiki Ohshima added a comment - 10/Sep/09 06:08 PM
And after all, we seem to be doing the browser lunching path, as the license concern is solved and not much more work involved.