Forums | Mahara Community

Developers /
Prevent Blocktypes from installing upon new user registration


anonymous profile picture
Account deleted
Posts: 34

16 September 2009, 10:05

I 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.
anonymous profile picture
Account deleted
Posts: 228

16 September 2009, 11:52

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.

anonymous profile picture
Account deleted
Posts: 34

16 September 2009, 17:42

How is it copied each time a user is created?
anonymous profile picture
Account deleted
Posts: 1643

16 September 2009, 18:40

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). 

anonymous profile picture
Account deleted
Posts: 34

16 September 2009, 14:05

Cancel this topic.  I've decided to not go this route because of to many conflictions.
anonymous profile picture
Account deleted
Posts: 34

16 September 2009, 17:45

On second thought I have to somehow implement this.  So, cancel the "Cancel this topic." entry .... Sorry people.Surprised
6 results