Module: PhcdevworksCore::PhcdevPluginsHelper

Defined in:
app/helpers/phcdevworks_core/phcdev_plugins_helper.rb

Instance Method Summary collapse

Instance Method Details

#phcdevworks_accounts_admin_onlyObject

PHCDev - Accounts - Add Admin Only Filter



5
6
7
8
9
# File 'app/helpers/phcdevworks_core/phcdev_plugins_helper.rb', line 5

def phcdevworks_accounts_admin_only
	unless current_user && current_user.admin?
		redirect_to main_app.root_path, :flash => { :error => "Sorry Access Denied. Adminisistration Access Required!" }
	end
end

#phcmembers_get_member_profile_infoObject

PHCDev - Members - Grab Member Information



17
18
19
# File 'app/helpers/phcdevworks_core/phcdev_plugins_helper.rb', line 17

def phcmembers_get_member_profile_info
	@members_profile_info = Phcmembers::Member::Profile.find(params[:profile_id])
end

#phcmemberspro_get_member_profile_infoObject

PHCDev - Members - Grab Member Information



22
23
24
# File 'app/helpers/phcdevworks_core/phcdev_plugins_helper.rb', line 22

def phcmemberspro_get_member_profile_info
	@members_profile_info = Phcmemberspro::Member::Profile.find(params[:profile_id])
end

#user_for_paper_trailObject

PHCDev - Accounts - Who Dunnit



12
13
14
# File 'app/helpers/phcdevworks_core/phcdev_plugins_helper.rb', line 12

def user_for_paper_trail
	current_user ? current_user.username : "Public user"
end