Browse Source

rename user model

main
ghost 3 years ago
parent
commit
4b0964f15b
  1. 2
      src/application/controller/login.php
  2. 2
      src/application/model/user.php
  3. 4
      src/bootstrap.php

2
src/application/controller/login.php

@ -54,7 +54,7 @@ if (isset($_POST) && $_POST) {
if (!$errorUserName && !$errorUserPrivateKey) { if (!$errorUserName && !$errorUserPrivateKey) {
// Check user exists // Check user exists
if ($_modelUserWallet->userNameExists($userName)) { if ($_modelUser->userNameExists($userName)) {
if ($_twister->importWallet($userName, $userPrivateKey)) { if ($_twister->importWallet($userName, $userPrivateKey)) {

2
src/application/model/user/wallet.php → src/application/model/user.php

@ -1,6 +1,6 @@
<?php <?php
class ModelUserWallet extends Model { class ModelUser extends Model {
public function userNameExists(string $userName) { public function userNameExists(string $userName) {

4
src/bootstrap.php

@ -4,7 +4,7 @@
require('config.php'); require('config.php');
require(PROJECT_DIR . '/application/model/model.php'); require(PROJECT_DIR . '/application/model/model.php');
require(PROJECT_DIR . '/application/model/user/wallet.php'); require(PROJECT_DIR . '/application/model/user.php');
require(PROJECT_DIR . '/system/curl.php'); require(PROJECT_DIR . '/system/curl.php');
require(PROJECT_DIR . '/system/twister.php'); require(PROJECT_DIR . '/system/twister.php');
@ -23,7 +23,7 @@ $_twister = new Twister(
); );
// Init models // Init models
$_modelUserWallet = new ModelUserWallet( $_modelUser = new ModelUser(
DB_DATABASE, DB_DATABASE,
DB_HOST, DB_HOST,
DB_PORT, DB_PORT,

Loading…
Cancel
Save