| 1 |
<?php |
<?php |
| 2 |
// $Id: nodeprofile.module,v 1.7.2.33 2008/02/04 11:29:32 fago Exp $ |
// $Id: nodeprofile.module,v 1.7.2.34 2008/04/07 18:17:39 fago Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 435 |
} |
} |
| 436 |
} |
} |
| 437 |
break; |
break; |
| 438 |
|
|
| 439 |
case 'register': |
case 'register': |
| 440 |
return nodeprofile_get_register_form(); |
//without data separation adding new users as admin won't worky any more (see #207802), |
| 441 |
|
//so we turn the nodeprofile integration of there |
| 442 |
|
if (arg(0) != 'admin' || arg(2) != 'user') { |
| 443 |
|
return nodeprofile_get_register_form(); |
| 444 |
|
} |
| 445 |
|
break; |
| 446 |
|
|
| 447 |
case 'insert': |
case 'insert': |
| 448 |
global $new_account; |
global $new_account; |
| 533 |
$form[$type]['form'] = array( |
$form[$type]['form'] = array( |
| 534 |
'#type' => 'subform', |
'#type' => 'subform', |
| 535 |
'#id' => $type. '_node_form', |
'#id' => $type. '_node_form', |
| 536 |
//data separation should be set to FALSE, so that imagefield works (see #201804), |
//data separation should be set to FALSE, so that imagefield works (see #201804) |
| 537 |
//but without data separation adding new users as admin won't worky any more (see #207802), |
'#data_separation' => FALSE, |
|
//so we turn it on for the admin's "Add user" page only. |
|
|
'#data_separation' => (arg(0) == 'admin' && arg(2) == 'user'), |
|
| 538 |
'#arguments' => array($node), |
'#arguments' => array($node), |
| 539 |
'#subform_after_build' => array('nodeprofile_integration_adapt_node_form'), |
'#subform_after_build' => array('nodeprofile_integration_adapt_node_form'), |
| 540 |
); |
); |