Commit 962c9c48 authored by Robert Lyon's avatar Robert Lyon
Browse files

Making sure user is logged in before they can see the tinymce



Bug 1460850

As we shouldn't be able to see/use it if we are anonymous user

Change-Id: I1e454bcbd17667c88650360cee82069801e7c36b
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent cb1da444
......@@ -3891,8 +3891,10 @@ function mahara_log($logname, $string) {
function is_html_editor_enabled () {
global $USER, $SESSION;
return ((!get_config('wysiwyg') && $USER->get_account_preference('wysiwyg')) ||
get_config('wysiwyg') == 'enable') && $SESSION->get('handheld_device') == false;
return (
(!get_config('wysiwyg') && $USER->get_account_preference('wysiwyg')) ||
(get_config('wysiwyg') == 'enable' && $USER->is_logged_in())
) && $SESSION->get('handheld_device') == false;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment