DWFrank wrote:
> For my app I was considering having no first/last storage

I don't believe the firstname and lastname fields are required. 
Therefore you could just drop them from the schema. Obviously you will 
need to override the signup template to not ask for these fields. This 
is just speculation since my app is accepting first and last name.

> and using 
> email addresses as logins -- or at least allowing email address to be 
> the ID a user uses (there certainly is value in allowing an account to 
> switch email address values over time).

I did the following in my user model to handle this:

class User < ActiveRecord::Base
        # Mixin free user functionality from login engine
        include LoginEngine::AuthenticatedUser

        # Username should always match email address
        before_validation do |r|
                r.login = r.email
        end
end

This way anytime the email address is changed the login name will change 
also automatically. I just adjusted all templates to say "Email Address" 
instead of "User ID" (or whatever the old label was). Internally the 
login field is still used but from the user's perspective they are only 
managing an email address.

Eric

_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to