Class: HubSsoLib::User

Inherits:
Object
  • Object
show all
Defined in:
lib/hub_sso_lib.rb

Overview

Class: User #

(C) Hipposoft 2006                                         #
                                                           #

Purpose: A representation of the Hub application’s User Model in #

terms of a simple set of properties, so that applications  #
don't need User access to understand user attributes.      #
                                                           #

Author: A.D.Hodgkinson #

#

History: 21-Oct-2006 (ADH): Created. #

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUser

Returns a new instance of User.



392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/hub_sso_lib.rb', line 392

def initialize
  @user_salt = nil
  @user_roles = nil
  @user_updated_at = nil
  @user_activated_at = nil
  @user_real_name = nil
  @user_crypted_password = nil
  @user_remember_token_expires_at = nil
  @user_activation_code = nil
  @user_member_id = nil
  @user_id = nil
  @user_password_reset_code = nil
  @user_remember_token = nil
  @user_email = nil
  @user_created_at = nil
  @user_password_reset_code_expires_at = nil
end

Instance Attribute Details

#user_activated_atObject

Returns the value of attribute user_activated_at.



379
380
381
# File 'lib/hub_sso_lib.rb', line 379

def user_activated_at
  @user_activated_at
end

#user_activation_codeObject

Returns the value of attribute user_activation_code.



383
384
385
# File 'lib/hub_sso_lib.rb', line 383

def user_activation_code
  @user_activation_code
end

#user_created_atObject

Returns the value of attribute user_created_at.



389
390
391
# File 'lib/hub_sso_lib.rb', line 389

def user_created_at
  @user_created_at
end

#user_crypted_passwordObject

Returns the value of attribute user_crypted_password.



381
382
383
# File 'lib/hub_sso_lib.rb', line 381

def user_crypted_password
  @user_crypted_password
end

#user_emailObject

Returns the value of attribute user_email.



388
389
390
# File 'lib/hub_sso_lib.rb', line 388

def user_email
  @user_email
end

#user_idObject

Returns the value of attribute user_id.



385
386
387
# File 'lib/hub_sso_lib.rb', line 385

def user_id
  @user_id
end

#user_member_idObject

Returns the value of attribute user_member_id.



384
385
386
# File 'lib/hub_sso_lib.rb', line 384

def user_member_id
  @user_member_id
end

#user_password_reset_codeObject

Returns the value of attribute user_password_reset_code.



386
387
388
# File 'lib/hub_sso_lib.rb', line 386

def user_password_reset_code
  @user_password_reset_code
end

#user_password_reset_code_expires_atObject

Returns the value of attribute user_password_reset_code_expires_at.



390
391
392
# File 'lib/hub_sso_lib.rb', line 390

def user_password_reset_code_expires_at
  @user_password_reset_code_expires_at
end

#user_real_nameObject

Returns the value of attribute user_real_name.



380
381
382
# File 'lib/hub_sso_lib.rb', line 380

def user_real_name
  @user_real_name
end

#user_remember_tokenObject

Returns the value of attribute user_remember_token.



387
388
389
# File 'lib/hub_sso_lib.rb', line 387

def user_remember_token
  @user_remember_token
end

#user_remember_token_expires_atObject

Returns the value of attribute user_remember_token_expires_at.



382
383
384
# File 'lib/hub_sso_lib.rb', line 382

def user_remember_token_expires_at
  @user_remember_token_expires_at
end

#user_rolesObject

Returns the value of attribute user_roles.



377
378
379
# File 'lib/hub_sso_lib.rb', line 377

def user_roles
  @user_roles
end

#user_saltObject

This *must not* be ‘undumped’, since it gets passed from clients back to the persistent DRb server process. A client thread may disappear and be recreated by the web server at any time; if the user object is undumpable, then the DRb server has to *call back to the client* (in DRb, clients are also servers…!) to find out about the object. Trouble is, if the client thread has been recreated, the server will be trying to access to stale objects that only exist if the garbage collector hasn’t got to them yet.



376
377
378
# File 'lib/hub_sso_lib.rb', line 376

def user_salt
  @user_salt
end

#user_updated_atObject

Returns the value of attribute user_updated_at.



378
379
380
# File 'lib/hub_sso_lib.rb', line 378

def user_updated_at
  @user_updated_at
end