Suggest Totara Learn features

Email is private

 
? ?
Email is private
by ? ? - Thursday, 3 May 2012, 2:24 AM
 

Hi There,

Something else we have noticed in the Reports, is if the user email address field is included it will display as "Email is private" if the email address is private.

However almost all of the time its administrator level users viewing these reports so have the permission to view/change users details anyway, so it would be appropriate for them to see this information.

Thanks,

Joe

Simon Coggins
Re: Email is private
by Simon Coggins - Thursday, 3 May 2012, 2:50 AM
Group Totara

Hi Joe,

The ideal way to handle this would be via a capability check, but unfortunately in Moodle 1.9 this would require a check for every record in the report which would cause performance problems on large sites.

Rather than risk performance issues, or leak personal information we opted for the 'Email is private' text for users who haven't set "Allow everyone to see my email" in their profile.

In Moodle 2 the capabilities system has been improved, and I'm hopeful we'll be able to remove that restriction at some point.

If you wanted to change this restriction on your site you could change the code. You'd need to edit local/reportbuilder/classes/rb_base_source.php and change two bits:

1. Around L1045 change:

"CASE WHEN $join.maildisplay <> 1 THEN '-' ELSE $join.email END",

to:

"$join.email",

2. Around L679 remove this section:

// respect users email privacy setting
// at some point we may want to allow admins to view anyway
if ($maildisplay != 1) {
return get_string('useremailprivate', 'local_reportbuilder');
}

Be aware that this will affect all report builder reports and will allow any user who can see the report to see the users email, ignoring the privacy setting they choose in their profile.

Simon

Nikhil Bansal
Re: Email is private
by Nikhil Bansal - Sunday, 21 February 2021, 12:28 AM
Group Partners

Hi,


While creating the local report builder what all files must be there v13? local\reportbuilder

I have just added rb_sources with reports & version.php.

Is it sufficient?

Regards,

Nikhil

me
Re: Email is private
by George Angus - Wednesday, 4 September 2013, 3:55 PM
Group Totara

Hi Joe,

A patch is being prepared for the next release 2.4.10, futher details are here:

https://totara.community/mod/forum/discuss.php?d=17635

regards,

George.