Forums | Mahara Community
Prevent Blocktypes from installing upon new user registration
16 September 2009, 10:05 AMI was wondering if there was a way to prevent Mahara from automatically installing the blocktypes that show up after a user first registers? EX: My Friends, About Me, My Labs, My Groups, and Feedback are all installed initially. How do I prevent these from showing up? I've tried to comment out the function install_system_profile_view() but it still installs the blocktypes automatically. Any insight would be awesome.
16 September 2009, 11:52 AM
Actually what happens is that the system profile view gets installed during mahara installation, and then it is *copied* to the user profile view when their account is created.
You could either remove the blocks from the system profile view in the database (by finding the id of it, it's the one with owner 0 and type "profile", and then looking for blocks with that id), or add some code into create_user to remove those blocks each time.
Hope that helps.
16 September 2009, 5:42 PMHow is it copied each time a user is created?
16 September 2009, 6:40 PM
Actually, it gets created the first time anyone visit's the user's profile view. See the method install_profile_view() in auth/user.php. It's a copy of the system profile view, like Penny said - though it adds the 'about me' block manually, so it can be populated with the user's data (which of course can't really exist in the template).
16 September 2009, 2:05 PMCancel this topic. I've decided to not go this route because of to many conflictions.
16 September 2009, 5:45 PMOn second thought I have to somehow implement this. So, cancel the "Cancel this topic." entry .... Sorry people.