// save
$this->User->create();
- if ($this->User->save($this->data, array('fieldList' => $this->User->fields['add']))) {
+ $fieldList =$this->User->fields['add'];
+ if ($this->isAdmin) {
+ $fieldList = array_merge($fieldList, array('pcmail'));
+ }
+ if ($this->User->save($this->data, array('fieldList' => $fieldList))) {
if (!$this->isAdmin) {
$this->Session->setFlash(__('The User has been saved. Please Login.', true));
$this->redirect($this->AuthPlus->loginAction);
<p>
<?php
echo $form->input('User.password1', array(
- 'label' => 'Password of the Administrator',
+ 'label' => __('Password of the Administrator', true),
'type' => 'password',
'value' => '',
'maxlength' => $passwordLength['max'],
)
));
echo $form->input('User.password2', array(
- 'label' => 'Password of the Administrator[Confirm]',
+ 'label' => __('Password of the Administrator[Confirm]', true),
'type' => 'password',
'value' => '',
'after' => $html->div('required',
<p>
<?php
echo $form->input('User.pcmail', array(
- 'label' => 'Pc Mail Address',
+ 'label' => __('Pc Mail Address', true),
'after' => $html->tag('div',
'required',
__(' * required', true),
$siteName = $this->data['SiteConfig']['siteName'];
}
echo $form->input('SiteConfig.siteName', array(
- 'label' => 'Site Name',
+ 'label' => __('Site Name', true),
'value' => $siteName,
));
'label' => __('Password [confirm]', true),
'maxlength' => $passwordLength['max'],
));
+ echo $form->input('pcmail', array(
+ 'label' => __('Pc Mail Address', true),
+ ));
echo $token->create();
?>
</fieldset>