summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-10-15 11:19:19 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-10-15 11:19:19 +0300
commit01186f9fc6f5f5645ea5406ce571f83db0dc080a (patch)
tree5771123265a9d0d6bdabdc79472c186e6a581c8e
parent2e8b0fa5cf9e70c55bd1dbb254db3f9aa45b23e9 (diff)
downloadgitlab-ce-01186f9fc6f5f5645ea5406ce571f83db0dc080a.tar.gz
Show confirmation status in profile
-rw-r--r--CHANGELOG2
-rw-r--r--app/controllers/admin/users_controller.rb1
-rw-r--r--app/views/profiles/show.html.haml7
3 files changed, 9 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 58d2bfa63e8..75141fe914f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -17,6 +17,8 @@ v 6.2.0
- Avatar upload on profile page with a maximum of 200KB (Steven Thonus)
- Store the sessions in Redis instead of the cookie store
- Fixed relative links in markdown
+ - User must confirm his email if signup enabled
+ - User must confirm changed email
v 6.1.0
- Project specific IDs for issues, mr, milestones
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb
index 076c5f0ba58..dccbfa2f709 100644
--- a/app/controllers/admin/users_controller.rb
+++ b/app/controllers/admin/users_controller.rb
@@ -72,6 +72,7 @@ class Admin::UsersController < Admin::ApplicationController
respond_to do |format|
if user.update_attributes(params[:user], as: :admin)
+ user.confirm!
format.html { redirect_to [:admin, user], notice: 'User was successfully updated.' }
format.json { head :ok }
else
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index ada2892c6ba..2dce690c8dd 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -25,7 +25,12 @@
= f.label :email, class: "control-label"
.controls
= f.text_field :email, class: "input-xlarge", required: true
- %span.help-block We also use email for avatar detection if no avatar is uploaded.
+ - if @user.unconfirmed_email.present?
+ %span.help-block
+ We sent confirmation email to
+ %strong #{@user.unconfirmed_email}
+ - else
+ %span.help-block We also use email for avatar detection if no avatar is uploaded.
.control-group
= f.label :skype, class: "control-label"
.controls= f.text_field :skype, class: "input-xlarge"