Use proper token to find the administrateur ... how can it works otherwise ?
This commit is contained in:
parent
7e78b7d62d
commit
7ac243ac44
2 changed files with 3 additions and 2 deletions
|
@ -2,7 +2,8 @@ class Administrateurs::ActivateController < ApplicationController
|
||||||
include TrustedDeviceConcern
|
include TrustedDeviceConcern
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@administrateur = Administrateur.find_inactive_by_token(params[:token])
|
@token = params[:token]
|
||||||
|
@administrateur = Administrateur.find_inactive_by_token(@token)
|
||||||
|
|
||||||
if @administrateur
|
if @administrateur
|
||||||
# the administrateur activates its account from an email
|
# the administrateur activates its account from an email
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
%h1
|
%h1
|
||||||
Choix du mot de passe
|
Choix du mot de passe
|
||||||
|
|
||||||
= f.hidden_field :reset_password_token, value: @administrateur.reset_password_token
|
= f.hidden_field :reset_password_token, value: @token
|
||||||
= f.label :email, "Email"
|
= f.label :email, "Email"
|
||||||
= f.text_field :email, disabled: true
|
= f.text_field :email, disabled: true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue