function spaces_user_user in Spaces 6
Same name and namespace in other branches
- 5.2 spaces_user.module \spaces_user_user()
- 6.3 spaces_user/spaces_user.module \spaces_user_user()
- 6.2 spaces_user/spaces_user.module \spaces_user_user()
Implementation of hook_user().
File
- spaces_user/
spaces_user.module, line 275
Code
function spaces_user_user($op, &$edit, &$account, $category = NULL) {
switch ($op) {
case 'form':
if ($category == 'account') {
$space = spaces_load('user', $account->uid);
$form = array(
'spaces_preset' => spaces_form_presets($space),
);
return $form;
}
break;
case 'insert':
case 'update':
if (isset($edit['preset'])) {
$space = spaces_load('user', $account->uid);
$space->preset = $edit['preset'];
spaces_save($space);
}
break;
}
}