* VRFS-2298 - tack on JamKazam Staff to username in vanilla forums if admin

This commit is contained in:
Seth Call 2014-10-02 14:04:36 -05:00
parent 40506afaa0
commit 0fdb932db1
2 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,8 @@ class VanillaForumsController < ApplicationController
user = {name: '', photourl: ''}
if current_user
user = {email: current_user.email, name: current_user.username,
name = current_user.admin ? "#{current_user.name} #{Rails.application.config.vanilla_staff_postfix}" : current_user.name
user = {email: current_user.email, name: name,
photourl: current_user.profile_pic,
uniqueid: current_user.username}
end
@ -37,7 +38,8 @@ class VanillaForumsController < ApplicationController
user = {}
if current_user
user = {'email' => current_user.email, 'name' => current_user.name,
name = current_user.admin ? "#{current_user.name} #{Rails.application.config.vanilla_staff_postfix}" : current_user.name
user = {'email' => current_user.email, 'name' => name,
'photourl' => current_user.resolved_photo_url,
'uniqueid' => current_user.id}

View File

@ -230,6 +230,7 @@ if defined?(Bundler)
config.vanilla_secret = 'bibbitybobbityslipperyslopes'
config.vanilla_url = 'http://forums.jamkazam.com'
config.vanilla_login_url = 'http://forums.jamkazam.com/entry/jsconnect'
config.vanilla_staff_postfix = '(JamKazam Staff)'
# we have to do this for a while until all www.jamkazam.com cookies are gone,
# and only .jamkazam.com cookies are around.. 2016?