I would like to create a User Personal Space at the time some user is created, using the hook 'hook_user_insert'.
The intention is to maintain a custom Space than in the moment of a user creation, it becomes the user's personal space with minimum functionalities to start with (Calendar an News section). The code in the hook would change the user space name and have that user as the 'administrator member' and may be other additional elements.
My programming experience in Drupal is not large (a couple of modules) but I would like to understand better how OA2 is built.
Is there an OA2 API to interactuate with it from a hook? Please give me an starting point a what should I look at.

Comments

Argus’s picture

Isn't the user dashboard (/user/%/view) the same as what you try to create?

ramiro.alba’s picture

Well, as far as I can see, you can only make view of contents related to the user already present in some spaces, I can not see the way of having personal events or documents. Am I wrong? The main intention is having a personal calendar and may be some documents online, not available to other users. You need an space, don't you?

Argus’s picture

Title: Customizing user creation phase » Customizing user creation phase, creation of a Private Personal Space

Ah ok, now I understand what you mean: a Private Personal Space, right? Perhaps you can accomplish the same with the use of Rules.

Argus’s picture

Did you get any further on this?

ramiro.alba’s picture

Not really. I did a research on the matter and I decided to postpone the solution. It helped a lot to be able to clone spaces, so I'll have to discover how to automate this at user creation. Not very important for now. It will depend on daily use. Anyway, thanks for your interest.

Argus’s picture

Status: Active » Fixed

Ok, shall we close the issue then? Please reopen if needed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.