Skip to content
Extraits de code Groupes Projets
Valider e7071fd7 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

fix admin inviter

parent 43d6acd8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -11,10 +11,12 @@ class AdminsController < ApplicationController ...@@ -11,10 +11,12 @@ class AdminsController < ApplicationController
def admin_inviter def admin_inviter
user = User.find_by_email params[:idenitifer] user = User.find_by_email params[:idenitifer]
unless user unless user
Invitation.create(:service => 'email', :identifer => params[:identifier], :admin => true) Invitation.create(:service => 'email', :identifier => params[:identifier], :admin => true)
flash[:notice] = "invitation sent to #{params[:identifier]}" flash[:notice] = "invitation sent to #{params[:identifier]}"
else
flash[:notice]= "error sending invite to #{params[:identifier]}"
end end
redirect_to user_search_path redirect_to user_search_path, :notice => flash[:notice]
end end
def stats def stats
......
...@@ -394,8 +394,7 @@ ActiveRecord::Schema.define(:version => 20110818212541) do ...@@ -394,8 +394,7 @@ ActiveRecord::Schema.define(:version => 20110818212541) do
t.string "language" t.string "language"
t.string "email", :default => "", :null => false t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "password_salt", :default => "", :null => false t.string "invitation_token", :limit => 60
t.string "invitation_token", :limit => 20
t.datetime "invitation_sent_at" t.datetime "invitation_sent_at"
t.string "reset_password_token" t.string "reset_password_token"
t.string "remember_token" t.string "remember_token"
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter