MDL-79242 tool_mobile: Pass site as installation referrer for the app

This commit is contained in:
Juan Leyva
2023-09-02 18:12:25 +02:00
parent 9bfcd77d51
commit eeff6d4c05
+6
View File
@@ -83,6 +83,12 @@ function tool_mobile_create_app_download_url() {
$downloadurl->param('androidappid', $mobilesettings->androidappid);
}
// For privacy reasons, add siteurl param only if the site is registered.
// This is to implement Google Play Referrer (so the site url is automatically populated in the app after installation).
if (\core\hub\registration::is_registered()) {
$downloadurl->param('siteurl', $CFG->wwwroot);
}
return $downloadurl;
}