From bf36ee9b2bfab7bc5aca1eda3ddea395a4296293 Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Tue, 13 Jul 2010 13:14:37 +0000 Subject: [PATCH] NOMDL MNet: Remote application like Mahara does not send user's lang attribute --- auth/mnet/auth.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index 72e8bfde511..ef51a828520 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -256,7 +256,9 @@ class auth_plugin_mnet extends auth_plugin_base { // the user may roam from Moodle 1.x where lang has _utf8 suffix // also, make sure that the lang is actually installed, otherwise set site default - $remoteuser->lang = clean_param(str_replace('_utf8', '', $remoteuser->lang), PARAM_LANG); + if (isset($remoteuser->lang)) { + $remoteuser->lang = clean_param(str_replace('_utf8', '', $remoteuser->lang), PARAM_LANG); + } if (empty($remoteuser->lang)) { if (!empty($CFG->lang)) { $remoteuser->lang = $CFG->lang;