Browse Source
- changed codestandard to CodeIgniter4 (phpcs) - added document doc & class doc - added fuctions docsv3-dev
13 changed files with 575 additions and 109 deletions
@ -1,16 +1,46 @@
|
||||
<?php |
||||
/** |
||||
* CodeIgniter-Aauth |
||||
* |
||||
* Aauth is a User Authorization Library for CodeIgniter 4.x, which aims to make |
||||
* easy some essential jobs such as login, permissions and access operations. |
||||
* Despite ease of use, it has also very advanced features like groupping, |
||||
* access management, public access etc.. |
||||
* |
||||
* @package CodeIgniter-Aauth |
||||
* @author Magefly Team |
||||
* @author Jacob Tomlinson |
||||
* @author Tim Swagger (Renowne, LLC) <tim@renowne.com> |
||||
* @author Raphael Jackstadt <info@rejack.de> |
||||
* @copyright 2014-2017 Emre Akay |
||||
* @copyright 2018 Magefly |
||||
* @license https://opensource.org/licenses/MIT MIT License |
||||
* @link https://github.com/magefly/CodeIgniter-Aauth |
||||
*/ |
||||
|
||||
namespace App\Database\Migrations; |
||||
|
||||
use CodeIgniter\Database\Migration; |
||||
use Config\Aauth as AauthConfig; |
||||
|
||||
/** |
||||
* Create default admin |
||||
* |
||||
* @package CodeIgniter-Aauth |
||||
* |
||||
* @codeCoverageIgnore |
||||
*/ |
||||
class Migration_create_default_admin extends Migration |
||||
{ |
||||
/** |
||||
* Create Table |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function up() |
||||
{ |
||||
$config = new AauthConfig(); |
||||
|
||||
$data = [ |
||||
$data = [ |
||||
'username' => 'admin', |
||||
'email' => '[email protected]', |
||||
'password' => password_hash('password123456', $config->passwordHashAlgo, $config->passwordHashOptions), |
||||
@ -34,8 +64,14 @@ class Migration_create_default_admin extends Migration
|
||||
|
||||
//-------------------------------------------------------------------- |
||||
|
||||
/** |
||||
* Drops Table |
||||
* |
||||
* @return void |
||||
*/ |
||||
public function down() |
||||
{ |
||||
$config = new AauthConfig(); |
||||
$this->db->table($config->dbTableUsers)->truncate(); |
||||
$this->db->table($config->dbTableGroupToUser)->truncate(); |
||||
} |
||||
|
Loading…
Reference in new issue