Browse Source

added dbReturnType

v3-dev
REJack 6 years ago
parent
commit
02f271cf18
No known key found for this signature in database
GPG Key ID: 4A44B48700429F46
  1. 10
      app/Config/Aauth.php
  2. 1
      app/Models/Aauth/GroupModel.php
  3. 1
      app/Models/Aauth/PermModel.php
  4. 3
      app/Models/Aauth/UserModel.php

10
app/Config/Aauth.php

@ -292,6 +292,15 @@ class Aauth extends BaseConfig
| The configuration database profile (defined in Config/Database.php)
| (default: 'default')
|
| 'dbReturnType'
|
| The format that the results should be returned as, for any get* &
| list* function. (e.g. getUser, listUsers, ...).
| Available types:
| - array
| - object
| (default: 'array')
|
| 'dbTableUsers'
|
| The table which contains users
@ -366,6 +375,7 @@ class Aauth extends BaseConfig
| (default: false)
*/
public $dbProfile = 'default';
public $dbReturnType = 'array';
public $dbTableUsers = 'aauth_users';
public $dbTableUserVariables = 'aauth_user_variables';
public $dbTableLoginAttempts = 'aauth_login_attempts';

1
app/Models/Aauth/GroupModel.php

@ -64,6 +64,7 @@ class GroupModel extends Model
$this->table = $this->config->dbTableGroups;
$this->DBGroup = $this->config->dbProfile;
$this->tempUseSoftDeletes = $this->config->dbSoftDeleteGroups;
$this->tempReturnType = $this->config->dbReturnType;
$this->validationRules['name'] = 'required|is_unique[' . $this->table . '.name,id,{id}]';

1
app/Models/Aauth/PermModel.php

@ -64,6 +64,7 @@ class PermModel extends Model
$this->table = $this->config->dbTablePerms;
$this->DBGroup = $this->config->dbProfile;
$this->tempUseSoftDeletes = $this->config->dbSoftDeletePerms;
$this->tempReturnType = $this->config->dbReturnType;
$this->validationRules['name'] = 'required|is_unique[' . $this->table . '.name,id,{id}]';

3
app/Models/Aauth/UserModel.php

@ -88,7 +88,8 @@ class UserModel extends Model
$this->config = $config;
$this->table = $this->config->dbTableUsers;
$this->DBGroup = $this->config->dbProfile;
$this->tempUseSoftDeletes = $this->config->dbSoftDeleteGroups;
$this->tempUseSoftDeletes = $this->config->dbSoftDeleteUsers;
$this->tempReturnType = $this->config->dbReturnType;
$this->validationRules['email'] = 'required|valid_email|is_unique[' . $this->table . '.email]';
$this->validationRules['password'] = 'required|min_length[' . $this->config->passwordMin . ']|max_length[' . $this->config->passwordMax . ']';

Loading…
Cancel
Save