first commit
This commit is contained in:
31
autoload/admin/factory/class.Users.php
Normal file
31
autoload/admin/factory/class.Users.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
// po poprawkach
|
||||
namespace admin\factory;
|
||||
|
||||
class Users {
|
||||
|
||||
public function deleteAdmin( $id )
|
||||
{
|
||||
global $db;
|
||||
|
||||
$query = $db -> prepare( 'DELETE FROM pp_users WHERE id = :id' );
|
||||
$query -> bindValue( ':id' , $id , \PDO::PARAM_INT );
|
||||
$query -> execute();
|
||||
if ( $query -> rowCount() )
|
||||
\System::setAlert( 'Administrator został usunięty.' );
|
||||
$query -> closeCursor();
|
||||
}
|
||||
|
||||
public function deleteUser( $id )
|
||||
{
|
||||
global $db;
|
||||
|
||||
$query = $db -> prepare( 'DELETE FROM pp_users WHERE id = :id' );
|
||||
$query -> bindValue( ':id' , $id , \PDO::PARAM_INT );
|
||||
$query -> execute();
|
||||
if ( $query -> rowCount() )
|
||||
\System::setAlert( 'Użytkownik został usunięty.' );
|
||||
$query -> closeCursor();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user