this is pt_register plugin for elgg 1.8