- @user = session.delete(:new_user)
-
- if check_signup_allowed(@user.email)
- @user.data_public = true
- @user.description = "" if @user.description.nil?
- @user.creation_ip = request.remote_ip
- @user.languages = http_accept_language.user_preferred_languages
- @user.terms_agreed = Time.now.getutc
- @user.terms_seen = true
-
- if @user.auth_uid.blank?
- @user.auth_provider = nil
- @user.auth_uid = nil
+ self.current_user = session.delete(:new_user)
+
+ if check_signup_allowed(current_user.email)
+ current_user.data_public = true
+ current_user.description = "" if current_user.description.nil?
+ current_user.creation_ip = request.remote_ip
+ current_user.languages = http_accept_language.user_preferred_languages
+ current_user.terms_agreed = Time.now.getutc
+ current_user.terms_seen = true
+
+ if current_user.auth_uid.blank?
+ current_user.auth_provider = nil
+ current_user.auth_uid = nil