Commit a5abf9c7 authored by Nigel McNie's avatar Nigel McNie
Browse files

Get the information about where an MNET user has come from, from the database...

Get the information about where an MNET user has come from, from the database rather than hackily storing it in the session when they log in.
parent 36dad86f
......@@ -1793,8 +1793,11 @@ function profile_sideblock() {
);
if ($SESSION->get('mnetuser')) {
$authinstance = $SESSION->get('authinstance');
$authobj = AuthFactory::create($authinstance);
$peer = get_peer($authobj->wwwroot);
$data['mnetloggedinfrom'] = get_string('youhaveloggedinfrom', 'auth.xmlrpc',
$SESSION->get('mnetwwwroot'), $SESSION->get('mnetsitename'));
$authobj->wwwroot, $peer->name);
}
$data['unreadnotifications'] = call_static_method(generate_class_name('notification', 'internal'), 'unread_count', $USER->get('id'));
$data['unreadnotificationsmessage'] = $data['unreadnotifications'] == 1 ? get_string('unreadmessage') : get_string('unreadmessages');
......
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