Commit 01186f9fc6f5f5645ea5406ce571f83db0dc080a
1 parent
2e8b0fa5
Exists in
master
and in
4 other branches
Show confirmation status in profile
Showing
3 changed files
with
9 additions
and
1 deletions
Show diff stats
CHANGELOG
| ... | ... | @@ -17,6 +17,8 @@ v 6.2.0 |
| 17 | 17 | - Avatar upload on profile page with a maximum of 200KB (Steven Thonus) |
| 18 | 18 | - Store the sessions in Redis instead of the cookie store |
| 19 | 19 | - Fixed relative links in markdown |
| 20 | + - User must confirm his email if signup enabled | |
| 21 | + - User must confirm changed email | |
| 20 | 22 | |
| 21 | 23 | v 6.1.0 |
| 22 | 24 | - Project specific IDs for issues, mr, milestones | ... | ... |
app/controllers/admin/users_controller.rb
| ... | ... | @@ -72,6 +72,7 @@ class Admin::UsersController < Admin::ApplicationController |
| 72 | 72 | |
| 73 | 73 | respond_to do |format| |
| 74 | 74 | if user.update_attributes(params[:user], as: :admin) |
| 75 | + user.confirm! | |
| 75 | 76 | format.html { redirect_to [:admin, user], notice: 'User was successfully updated.' } |
| 76 | 77 | format.json { head :ok } |
| 77 | 78 | else | ... | ... |
app/views/profiles/show.html.haml
| ... | ... | @@ -25,7 +25,12 @@ |
| 25 | 25 | = f.label :email, class: "control-label" |
| 26 | 26 | .controls |
| 27 | 27 | = f.text_field :email, class: "input-xlarge", required: true |
| 28 | - %span.help-block We also use email for avatar detection if no avatar is uploaded. | |
| 28 | + - if @user.unconfirmed_email.present? | |
| 29 | + %span.help-block | |
| 30 | + We sent confirmation email to | |
| 31 | + %strong #{@user.unconfirmed_email} | |
| 32 | + - else | |
| 33 | + %span.help-block We also use email for avatar detection if no avatar is uploaded. | |
| 29 | 34 | .control-group |
| 30 | 35 | = f.label :skype, class: "control-label" |
| 31 | 36 | .controls= f.text_field :skype, class: "input-xlarge" | ... | ... |