Debug
This commit is contained in:
parent
deaa81e52e
commit
a1b0371055
1 changed files with 26 additions and 26 deletions
52
vendor/model/Users.class.php
vendored
52
vendor/model/Users.class.php
vendored
|
|
@ -107,13 +107,13 @@ class Users
|
|||
c.*
|
||||
from users u
|
||||
left join company c on u.company_id = c.company_id
|
||||
where u.users_id = :users_id';
|
||||
where u.user_id = :user_id';
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam(':users_id', $this->usersId);
|
||||
$this->stmt->bindParam(':user_id', $this->usersId);
|
||||
|
||||
/** Executo o SQL */
|
||||
$this->stmt->execute();
|
||||
|
|
@ -133,11 +133,11 @@ class Users
|
|||
$this->email = $email;
|
||||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'select count(u.users_id) as qtde
|
||||
$this->sql = 'select count(u.user_id) as qtde
|
||||
from users u
|
||||
where u.email = :email
|
||||
and u.clients_id <> :clients_id
|
||||
and u.users_id <> :users_id';
|
||||
and u.user_id <> :user_id';
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
|
@ -145,7 +145,7 @@ class Users
|
|||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam(':clients_id', $this->clientsId);
|
||||
$this->stmt->bindParam(':email', $this->email);
|
||||
$this->stmt->bindParam(':users_id', $this->usersId);
|
||||
$this->stmt->bindParam(':user_id', $this->usersId);
|
||||
|
||||
/** Executo o SQL */
|
||||
$this->stmt->execute();
|
||||
|
|
@ -176,9 +176,9 @@ class Users
|
|||
}
|
||||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'select count(users_id) as qtde
|
||||
$this->sql = 'select count(user_id) as qtde
|
||||
from users
|
||||
where users_id > 0 '.$this->and;
|
||||
where user_id > 0 '.$this->and;
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
|
@ -243,7 +243,7 @@ class Users
|
|||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'select * from users
|
||||
where users_id not in (select user_id from calls_users where call_id = :callId)
|
||||
where user_id not in (select user_id from calls_users where call_id = :callId)
|
||||
and company_id = :companyId';
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
|
|
@ -271,7 +271,7 @@ class Users
|
|||
$this->firstAccess = $firstAccess;
|
||||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'select u.users_id,
|
||||
$this->sql = 'select u.user_id,
|
||||
u.company_id,
|
||||
u.name_first,
|
||||
u.name_last,
|
||||
|
|
@ -302,7 +302,7 @@ class Users
|
|||
}
|
||||
|
||||
/** Verifica se o usuário esta ativo */
|
||||
echo $this->sql .= 'and u.active = "S"; ';
|
||||
$this->sql .= 'and u.active = "S"; ';
|
||||
|
||||
/** Preparo o sql para receber os valores */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
|
@ -359,14 +359,14 @@ class Users
|
|||
/** Consulta SQL */
|
||||
$this->sql = "update users set access_first = current_timestamp,
|
||||
access_last = current_timestamp
|
||||
where users_id = :users_id
|
||||
where user_id = :user_id
|
||||
and password is not null";
|
||||
|
||||
/** Preparo o sql para receber os valores */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam(':users_id', $_SESSION['USERSID']);
|
||||
$this->stmt->bindParam(':user_id', $_SESSION['USERSID']);
|
||||
|
||||
/** Executo o SQL */
|
||||
return $this->stmt->execute();
|
||||
|
|
@ -377,13 +377,13 @@ class Users
|
|||
case 'new':
|
||||
|
||||
/** Consulta SQL */
|
||||
$this->sql = "update users set access_last = current_timestamp where users_id = :users_id";
|
||||
$this->sql = "update users set access_last = current_timestamp where user_id = :user_id";
|
||||
|
||||
/** Preparo o sql para receber os valores */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam(':users_id', $_SESSION['USERSID']);
|
||||
$this->stmt->bindParam(':user_id', $_SESSION['USERSID']);
|
||||
|
||||
/** Executo o SQL */
|
||||
return $this->stmt->execute();
|
||||
|
|
@ -428,7 +428,7 @@ class Users
|
|||
birth_date = :birth_date,
|
||||
genre = :genre,
|
||||
administrator = :administrator,
|
||||
users_id_update = :users_id_update ';
|
||||
user_id_update = :user_id_update ';
|
||||
|
||||
/** Verifica se é para atualizar as senhas temporárias */
|
||||
if($this->passwordTempConfirm == 'S'){
|
||||
|
|
@ -439,13 +439,13 @@ class Users
|
|||
$this->sql .= ', password_temp = :password_temp ';
|
||||
}
|
||||
|
||||
$this->sql .= 'where users_id = :users_id';
|
||||
$this->sql .= 'where user_id = :user_id';
|
||||
|
||||
/** Preparo o sql para receber os valores */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam('users_id', $this->usersId);
|
||||
$this->stmt->bindParam('user_id', $this->usersId);
|
||||
$this->stmt->bindParam('clients_id', $this->clientsId);
|
||||
$this->stmt->bindParam('name_first', $this->nameFirst);
|
||||
$this->stmt->bindParam('name_last', $this->nameLast);
|
||||
|
|
@ -454,7 +454,7 @@ class Users
|
|||
$this->stmt->bindParam('birth_date', $this->birthDate);
|
||||
$this->stmt->bindParam('genre', $this->genre);
|
||||
$this->stmt->bindParam('administrator', $this->administrator);
|
||||
$this->stmt->bindParam('users_id_update', $this->usersIdUpdate);
|
||||
$this->stmt->bindParam('user_id_update', $this->usersIdUpdate);
|
||||
|
||||
/** Verifica se é para atualizar as senhas temporárias */
|
||||
if($this->passwordTempConfirm == 'S'){
|
||||
|
|
@ -468,7 +468,7 @@ class Users
|
|||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'insert into users(clients_id,
|
||||
users_id,
|
||||
user_id,
|
||||
company_id,
|
||||
name_first,
|
||||
name_last,
|
||||
|
|
@ -479,10 +479,10 @@ class Users
|
|||
genre,
|
||||
administrator,
|
||||
password_temp,
|
||||
users_id_create,
|
||||
user_id_create,
|
||||
password_temp_confirm
|
||||
) values (:clients_id,
|
||||
:users_id,
|
||||
:user_id,
|
||||
:company_id,
|
||||
:name_first,
|
||||
:name_last,
|
||||
|
|
@ -493,14 +493,14 @@ class Users
|
|||
:genre,
|
||||
:administrator,
|
||||
:password_temp,
|
||||
:users_id_create,
|
||||
:user_id_create,
|
||||
:password_temp_confirm)';
|
||||
|
||||
/** Preparo o sql para receber os valores */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam('users_id', $this->usersId);
|
||||
$this->stmt->bindParam('user_id', $this->usersId);
|
||||
$this->stmt->bindParam('clients_id', $this->clientsId);
|
||||
$this->stmt->bindParam('company_id', $this->companyId);
|
||||
$this->stmt->bindParam('name_first', $this->nameFirst);
|
||||
|
|
@ -512,7 +512,7 @@ class Users
|
|||
$this->stmt->bindParam('genre', $this->genre);
|
||||
$this->stmt->bindParam('administrator', $this->administrator);
|
||||
$this->stmt->bindParam('password_temp', $this->passwordTemp);
|
||||
$this->stmt->bindParam('users_id_create', $this->usersIdCreate);
|
||||
$this->stmt->bindParam('user_id_create', $this->usersIdCreate);
|
||||
$this->stmt->bindParam('password_temp_confirm', $this->passwordTempConfirm);
|
||||
|
||||
}
|
||||
|
|
@ -533,13 +533,13 @@ class Users
|
|||
password_temp = null,
|
||||
access_first = current_timestamp,
|
||||
password_temp_confirm = \'N\'
|
||||
where users_id = :users_id';
|
||||
where user_id = :user_id';
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam(':users_id', $_SESSION['USERSID']);/** Atualiza a senha de acordo com o usuário identificado */
|
||||
$this->stmt->bindParam(':user_id', $_SESSION['USERSID']);/** Atualiza a senha de acordo com o usuário identificado */
|
||||
$this->stmt->bindParam(':password', $this->password);/** Atualiza a senha do usuário identificado */
|
||||
|
||||
/** Executo o SQL */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue