| @@ 40-40 (lines=1) @@ | ||
| 37 | render(:new) && return unless valid_user_or_captcha |
|
| 38 | ||
| 39 | # Redirect to root if user token is either invalid or expired |
|
| 40 | return redirect_to root_path, flash: { alert: I18n.t("registration.invite.fail") } unless passes_invite_reqs |
|
| 41 | ||
| 42 | # User has passed all validations required |
|
| 43 | @user.save |
|
| @@ 55-55 (lines=1) @@ | ||
| 52 | @user_exists = check_user_exists |
|
| 53 | ||
| 54 | # If using invitation registration method, make sure user is invited |
|
| 55 | return redirect_to root_path, flash: { alert: I18n.t("registration.invite.no_invite") } unless passes_invite_reqs |
|
| 56 | ||
| 57 | user = User.from_omniauth(@auth) |
|
| 58 | ||