|
|
|
@ -9,15 +9,12 @@ use Exception;
|
|
|
|
|
|
|
|
|
|
class UserGateway extends AbsGateway
|
|
|
|
|
{
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
parent::__construct();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function add(array $parameters): int //require 9 elements
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$query = "INSERT INTO User_ VALUES (NULL, :password, :email, :name, :surname, :nickname, :image, :extraTime, :group)";
|
|
|
|
|
$query = "INSERT INTO User_
|
|
|
|
|
VALUES (NULL, :password, :email, :name, :surname, :nickname, :image, :extraTime, :group)";
|
|
|
|
|
|
|
|
|
|
$args = array(':password' => array($parameters[0], PDO::PARAM_STR),
|
|
|
|
|
':email' => array($parameters[1], PDO::PARAM_STR),
|
|
|
|
|
':name' => array($parameters[2], PDO::PARAM_STR),
|
|
|
|
@ -26,6 +23,7 @@ class UserGateway extends AbsGateway
|
|
|
|
|
':image' => array($parameters[5], PDO::PARAM_STR),
|
|
|
|
|
':extraTime' => array($parameters[6], PDO::PARAM_BOOL),
|
|
|
|
|
':group' => array($parameters[7], PDO::PARAM_INT));
|
|
|
|
|
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
$userID = $this->con->lastInsertId();
|
|
|
|
|
|
|
|
|
@ -37,8 +35,7 @@ class UserGateway extends AbsGateway
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $userID;
|
|
|
|
|
}
|
|
|
|
|
catch (PDOException $e){
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -55,8 +52,7 @@ class UserGateway extends AbsGateway
|
|
|
|
|
|
|
|
|
|
$query="DELETE FROM User_ WHERE id=:id";
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -67,39 +63,77 @@ class UserGateway extends AbsGateway
|
|
|
|
|
$this->con->executeQuery("SELECT * FROM User_");
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findAllAdmins(): array {
|
|
|
|
|
public function findAllAdmins(): array
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$this->con->executeQuery("SELECT u.* FROM User_ u, Be b WHERE u.id=b.userID AND b.roleID=1 ");
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findAllTeachers(): array {
|
|
|
|
|
public function findAllTeachers(): array
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$this->con->executeQuery("SELECT u.* FROM User_ u, Be b WHERE u.id=b.userID AND b.roleID=2");
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -109,11 +143,23 @@ class UserGateway extends AbsGateway
|
|
|
|
|
$this->con->executeQuery("SELECT u.* FROM User_ u, Be b WHERE u.id=b.userID AND b.roleID=3");
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -125,99 +171,171 @@ class UserGateway extends AbsGateway
|
|
|
|
|
$args = array(':id' => array($id, PDO::PARAM_INT));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
if (empty($results)) return null;
|
|
|
|
|
return new User($results[0]['id'], $results[0]['password'], $results[0]['email'], $results[0]['name'], $results[0]['surname'], $results[0]['nickname'], $results[0]['image'], $results[0]['extraTime'], $results[0]['groupID'], $this->getRoles($results[0]['id']));
|
|
|
|
|
|
|
|
|
|
if (empty($results)) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return new User(
|
|
|
|
|
$results[0]['id'],
|
|
|
|
|
$results[0]['password'],
|
|
|
|
|
$results[0]['email'],
|
|
|
|
|
$results[0]['name'],
|
|
|
|
|
$results[0]['surname'],
|
|
|
|
|
$results[0]['nickname'],
|
|
|
|
|
$results[0]['image'],
|
|
|
|
|
$results[0]['extraTime'],
|
|
|
|
|
$results[0]['groupID'],
|
|
|
|
|
$this->getRoles($results[0]['id']));
|
|
|
|
|
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function getRoles(int $id): array {
|
|
|
|
|
private function getRoles(int $id): array
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$query = "SELECT r.name FROM Be b, Role_ r WHERE b.userID=:id AND b.roleID=r.id";
|
|
|
|
|
$args = array(':id' => array($id, PDO::PARAM_INT));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row) $tab[] = $row['name'];
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = $row['name'];
|
|
|
|
|
}
|
|
|
|
|
catch (PDOException $e) {
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function login(string $login) : string{
|
|
|
|
|
public function login(string $login) : string
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$query = "SELECT password FROM User_ WHERE email=:email";
|
|
|
|
|
$args = array(':email' => array($login, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
return $this->con->getResults()[0]['password'];
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findUserByEmail(string $email): ?User{
|
|
|
|
|
public function findUserByEmail(string $email): ?User
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$query = "SELECT * FROM User_ WHERE email=:email";
|
|
|
|
|
$args = array(':email' => array($email, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
if (empty($results)) return null;
|
|
|
|
|
return new User($results[0]['id'], $results[0]['password'], $results[0]['email'], $results[0]['name'], $results[0]['surname'], $results[0]['nickname'], $results[0]['image'], $results[0]['extraTime'], $results[0]['groupID'], $this->getRoles($results[0]['id']));
|
|
|
|
|
|
|
|
|
|
if (empty($results)) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return new User(
|
|
|
|
|
$results[0]['id'],
|
|
|
|
|
$results[0]['password'],
|
|
|
|
|
$results[0]['email'],
|
|
|
|
|
$results[0]['name'],
|
|
|
|
|
$results[0]['surname'],
|
|
|
|
|
$results[0]['nickname'],
|
|
|
|
|
$results[0]['image'],
|
|
|
|
|
$results[0]['extraTime'],
|
|
|
|
|
$results[0]['groupID'],
|
|
|
|
|
$this->getRoles($results[0]['id']));
|
|
|
|
|
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findUserByName(string $name) : array{
|
|
|
|
|
public function findUserByName(string $name) : array
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$query = "SELECT * FROM User_ WHERE name=:name";
|
|
|
|
|
$args = array(':name' => array($name, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findUserBySurname(string $surname) : array{
|
|
|
|
|
public function findUserBySurname(string $surname) : array
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$query = "SELECT * FROM User_ WHERE surname=:surname";
|
|
|
|
|
$args = array(':surname' => array($surname, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findUserByNickname(string $nickname) : array{
|
|
|
|
|
public function findUserByNickname(string $nickname) : array
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$query = "SELECT * FROM User_ WHERE nickname=:nickname";
|
|
|
|
|
$args = array(':nickname' => array($nickname, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -228,8 +346,7 @@ class UserGateway extends AbsGateway
|
|
|
|
|
$query="UPDATE User_ SET password=:password WHERE id=:id";
|
|
|
|
|
$args = array(':id' => array($id, PDO::PARAM_INT), ':password' => array($newPassword, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -240,8 +357,7 @@ class UserGateway extends AbsGateway
|
|
|
|
|
$query="UPDATE User_ SET nickname=:nickname WHERE id=:id";
|
|
|
|
|
$args = array(':id' => array($id, PDO::PARAM_INT), ':nickname' => array($newNickname, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -252,8 +368,7 @@ class UserGateway extends AbsGateway
|
|
|
|
|
$query="UPDATE User_ SET image=:image WHERE id=:id";
|
|
|
|
|
$args = array(':id' => array($id, PDO::PARAM_INT), ':image' => array($newImage, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -264,24 +379,36 @@ class UserGateway extends AbsGateway
|
|
|
|
|
$query="UPDATE User_ SET groupID=:group WHERE id=:id";
|
|
|
|
|
$args = array(':id' => array($id, PDO::PARAM_INT), ':group' => array($newGroup, PDO::PARAM_STR));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findUsersByGroup(int $id): array {
|
|
|
|
|
public function findUsersByGroup(int $id): array
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$query = "SELECT * FROM User_ WHERE groupID=:group";
|
|
|
|
|
$args = array(':group' => array($id, PDO::PARAM_INT));
|
|
|
|
|
$this->con->executeQuery($query, $args);
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -293,11 +420,23 @@ class UserGateway extends AbsGateway
|
|
|
|
|
$this->con->executeQuery($query);
|
|
|
|
|
$results = $this->con->getResults();
|
|
|
|
|
$tab = array();
|
|
|
|
|
foreach ($results as $row)
|
|
|
|
|
$tab[] = new User($row['id'], $row['password'], $row['email'], $row['name'], $row['surname'], $row['nickname'], $row['image'], $row['extraTime'], $row['groupID'], $this->getRoles($row['id']));
|
|
|
|
|
return $tab;
|
|
|
|
|
|
|
|
|
|
foreach ($results as $row) {
|
|
|
|
|
$tab[] = new User(
|
|
|
|
|
$row['id'],
|
|
|
|
|
$row['password'],
|
|
|
|
|
$row['email'],
|
|
|
|
|
$row['name'],
|
|
|
|
|
$row['surname'],
|
|
|
|
|
$row['nickname'],
|
|
|
|
|
$row['image'],
|
|
|
|
|
$row['extraTime'],
|
|
|
|
|
$row['groupID'],
|
|
|
|
|
$this->getRoles($row['id']));
|
|
|
|
|
}
|
|
|
|
|
catch(PDOException $e ){
|
|
|
|
|
|
|
|
|
|
return $tab;
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
throw new Exception($e->getMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|