forked from bofh/fetsite
fix mail & author
This commit is contained in:
@@ -30,6 +30,7 @@ class NeuigkeitenController < ApplicationController
|
||||
def new
|
||||
@neuigkeit = Neuigkeit.new
|
||||
@rubrik=Rubrik.find(params[:rubrik_id]) unless params[:rubrik_id].nil?
|
||||
@neuigkeit.author=current_user
|
||||
@neuigkeit.rubrik=@rubrik unless @rubrik.nil?
|
||||
@calentries= [Calentry.new]
|
||||
|
||||
@@ -78,6 +79,8 @@ class NeuigkeitenController < ApplicationController
|
||||
|
||||
def create
|
||||
@neuigkeit = Neuigkeit.new(params[:neuigkeit])
|
||||
@neuigkeit.author=current_user
|
||||
|
||||
respond_to do |format|
|
||||
if @neuigkeit.save
|
||||
format.html { redirect_to [@neuigkeit.rubrik,@neuigkeit], notice: 'Neuigkeit was successfully created.' }
|
||||
|
||||
@@ -57,7 +57,7 @@ logger.debug auth.to_s
|
||||
user= User.create(name:auth.extra.raw_info.uid.first,
|
||||
provider:auth.provider,
|
||||
uid:auth.extra.raw_info.uid.first,
|
||||
email:auth.extra.raw_info.uid.first.to_s+"@fet.at",
|
||||
email:auth.extra.raw_info.mail.first.to_s,
|
||||
password:Devise.friendly_token[0,20])
|
||||
user.add_role("fetuser")
|
||||
logger.debug(auth.extra.raw_info.to_s)
|
||||
|
||||
Reference in New Issue
Block a user