Hi,
I'm looking for manage mangos accounts with Rails 3.
I'm using Authlogic (https://github.com/binarylogic/authlogic)
So, a rapidly working way, but certainly not the best,
is adding 'user_id' column to realmd > account, creating the realmd_account model, establish associations between user and realmd_account (has_one :realmd_account, belongs_to :user).
:001 > @user = User.find(1)
=> #<User id: 1, login: "foohey", email: "
[email protected]", crypted_password: "", password_salt: "", persistence_token: "", login_count: 39, failed_login_count: 0, last_request_at: "2011-03-05 13:51:35", current_login_at: "2011-03-05 12:51:09", last_login_at: "2011-03-05 12:51:02", current_login_ip: "127.0.0.1", last_login_ip: "127.0.0.1", created_at: "2011-03-05 12:17:41", updated_at: "2011-03-05 13:51:35", realmd_account_id: 5>
:002 > @user.realmd_account
=> #<RealmdAccount id: 5, user_id: 1, username: "FOOHEY", sha_pass_hash: "", gmlevel: 2, sessionkey: "", v: "", s: "", email: nil, joindate: "2011-02-12 16:33:19", last_ip: "", failed_logins: 0, locked: 0, last_login: "2011-03-02 10:52:38", active_realm_id: 0, expansion: 1, mutetime: 0, locale: 2>
:003 > @user.realmd_account.email
=> nil
:004 > @user.realmd_account.email = "
[email protected]"
=> "
[email protected]"
:005 > @user.realmd_account.save
=> true
:006 > @user.realmd_account
=> #<RealmdAccount id: 5, user_id: 1, username: "FOOHEY", sha_pass_hash: "", gmlevel: 2, sessionkey: "", v: "", s: "", email: "
[email protected]", joindate: "2011-02-12 16:33:19", last_ip: "", failed_logins: 0, locked: 0, last_login: "2011-03-02 10:52:38", active_realm_id: 0, expansion: 1, mutetime: 0, locale: 2>
do you think this is a secure solution ?