- $sql = 'INSERT INTO users ( username, password ) VALUES (?, ?)';
- $params = array($login, $password);
+ $sql = 'INSERT INTO users ( username, password, name, email) VALUES (?, ?, ?, ?)';
+ $params = array($login, $password, $login, ' ');
+ $query = $this->executeQuery($sql, $params);
+
+ $sequence = '';
+ if (STORAGE == 'postgres') {
+ $sequence = 'users_id_seq';
+ }
+
+ $id_user = intval($this->getLastId($sequence));
+
+ $sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)';
+ $params = array($id_user, 'pager', '10');
+ $query = $this->executeQuery($sql, $params);
+
+ $sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)';
+ $params = array($id_user, 'language', 'en_EN.UTF8');