Corrected redirection loop bug due to not urldecoded parameter
Replaced code deprecated in Elgg 1.9.
Now using the Elgg 1.9 notifications system.