Commit b8a15c9f authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1660502: Checking if theme exists when creating user"

parents 4d178a16 98f34182
...@@ -579,7 +579,8 @@ class View { ...@@ -579,7 +579,8 @@ class View {
$owner->find_by_id($viewdata['owner']); $owner->find_by_id($viewdata['owner']);
} }
$ownerthemedata = $owner->get('institutiontheme'); $ownerthemedata = $owner->get('institutiontheme');
$ownertheme = isset($ownerthemedata->basename) ? $ownerthemedata->basename : null; $themeoptions = get_all_themes();
$ownertheme = (isset($ownerthemedata->basename) && array_key_exists($ownerthemedata->basename, $themeoptions)) ? $ownerthemedata->basename : null;
if ($accounttheme = $owner->get_account_preference('theme')) { if ($accounttheme = $owner->get_account_preference('theme')) {
$accountthemeparts = explode('/', $accounttheme); $accountthemeparts = explode('/', $accounttheme);
$ownertheme = $accountthemeparts[0]; $ownertheme = $accountthemeparts[0];
......
Supports Markdown
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