Fixes to the first time initialisation script

pull/762/head
Iglocska 2015-10-15 11:35:44 +02:00
parent eeb1d8d117
commit 025087bf5d
2 changed files with 4 additions and 2 deletions

View File

@ -601,6 +601,7 @@ class UsersController extends AppController {
'type' => 'ADMIN',
'local' => 1
));
$this->User->Organisation->save($org);
}
// populate the DB with the first user if it's empty
if ($this->User->find('count') == 0 ) {

View File

@ -137,8 +137,9 @@ class User extends AppModel {
),
),
'gpgkey' => array(
'valueNotEmpty' => array(
'rule' => array('valueNotEmpty'),
'gpgvalidation' => array(
'rule' => array('validateGpgkey'),
'message' => 'GPG key not valid, please enter a valid key.',
),
),
'nids_sid' => array(