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.



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# File 'lib/hub_sso_lib.rb', line 360

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.



347
348
349
# File 'lib/hub_sso_lib.rb', line 347

def user_activated_at
  @user_activated_at
end

#user_activation_codeObject

Returns the value of attribute user_activation_code.



351
352
353
# File 'lib/hub_sso_lib.rb', line 351

def user_activation_code
  @user_activation_code
end

#user_created_atObject

Returns the value of attribute user_created_at.



357
358
359
# File 'lib/hub_sso_lib.rb', line 357

def user_created_at
  @user_created_at
end

#user_crypted_passwordObject

Returns the value of attribute user_crypted_password.



349
350
351
# File 'lib/hub_sso_lib.rb', line 349

def user_crypted_password
  @user_crypted_password
end

#user_emailObject

Returns the value of attribute user_email.



356
357
358
# File 'lib/hub_sso_lib.rb', line 356

def user_email
  @user_email
end

#user_idObject

Returns the value of attribute user_id.



353
354
355
# File 'lib/hub_sso_lib.rb', line 353

def user_id
  @user_id
end

#user_member_idObject

Returns the value of attribute user_member_id.



352
353
354
# File 'lib/hub_sso_lib.rb', line 352

def user_member_id
  @user_member_id
end

#user_password_reset_codeObject

Returns the value of attribute user_password_reset_code.



354
355
356
# File 'lib/hub_sso_lib.rb', line 354

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.



358
359
360
# File 'lib/hub_sso_lib.rb', line 358

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.



348
349
350
# File 'lib/hub_sso_lib.rb', line 348

def user_real_name
  @user_real_name
end

#user_remember_tokenObject

Returns the value of attribute user_remember_token.



355
356
357
# File 'lib/hub_sso_lib.rb', line 355

def user_remember_token
  @user_remember_token
end

#user_remember_token_expires_atObject

Returns the value of attribute user_remember_token_expires_at.



350
351
352
# File 'lib/hub_sso_lib.rb', line 350

def user_remember_token_expires_at
  @user_remember_token_expires_at
end

#user_rolesObject

Returns the value of attribute user_roles.



345
346
347
# File 'lib/hub_sso_lib.rb', line 345

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.



344
345
346
# File 'lib/hub_sso_lib.rb', line 344

def user_salt
  @user_salt
end

#user_updated_atObject

Returns the value of attribute user_updated_at.



346
347
348
# File 'lib/hub_sso_lib.rb', line 346

def user_updated_at
  @user_updated_at
end