Class: ODDB::State::Admin::PasswordReset

Inherits:
Global show all
Includes:
LoginMethods
Defined in:
src/state/admin/password_reset.rb

Constant Summary

VIEW =
View::Admin::PasswordReset

Constants inherited from Global

HOME_STATE, ZONE

Constants inherited from Global

DIRECT_EVENT, GLOBAL_MAP, HOME_STATE, LIMITED, PRINT_STATES, READONLY_STATES, RESOLVE_STATES, REVERSE_MAP, VIEW, ZONE_NAVIGATION

Constants included from UmlautSort

FILTER_PAIRS

Instance Method Summary (collapse)

Methods included from LoginMethods

#autologin, #login

Methods inherited from Global

#zone_navigation

Methods inherited from Global

#_search_drugs, #_search_drugs_state, #_trigger, #add_to_interaction_basket, #allowed?, #atc_chooser, #checkout, #clear_interaction_basket, #creditable?, #direct_request_path, #doctorlist, #download, #export_csv, #extend, #fachinfo, #feedbacks, #help_navigation, #home_navigation, #home_state, #hospitallist, #interaction_basket, #limit_state, #limited?, #logout, #navigation, #notify, #paypal_return, #powerlink, #print, #proceed_download, #proceed_poweruser, #resolve, #resolve_state, #rss, #search, #show, #snapback_event, #sort, #sponsorlink, #suggest_address, #switch, #unique_email, #user_input, #user_navigation, #ywesee_contact, #zone_navigation, #zones

Methods included from UmlautSort

#sort_model, #umlaut_filter

Instance Method Details

- (Object) password_reset



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'src/state/admin/password_reset.rb', line 14

def password_reset
  keys = [:set_pass_1, :set_pass_2]
  input = user_input(keys, keys)
  pass1 = input[:set_pass_1]
  pass2 = input[:set_pass_2]
  unless(error? || pass1 == pass2)
    err1 = create_error(:e_non_matching_set_pass, :set_pass_1, pass1)
    err2 = create_error(:e_non_matching_set_pass, :set_pass_2, pass2)
    @errors.store(:set_pass_1, err1)
    @errors.store(:set_pass_2, err2)
  end
  unless(error?)
     = @model.
    @session.yus_reset_password(, @model.token, pass1)
    @session.valid_input.store(:email, )
    @session.valid_input.store(:pass, pass1)
    @model = @session.
    autologin(@model, Confirm.new(@session, :password_reset_confirm))
  end
end