Removed bug in backend of users
This commit is contained in:
parent
22566986a8
commit
b08b01689f
@ -106,14 +106,14 @@ class ClubsUser
|
|||||||
/**
|
/**
|
||||||
* @param string $user
|
* @param string $user
|
||||||
*/
|
*/
|
||||||
public function setUser(string $user)
|
public function setUser(string $user, bool $force = false)
|
||||||
{
|
{
|
||||||
if($this->id === 'new')
|
if($this->id === 'new')
|
||||||
$valid = self::isUserNameFree($user);
|
$valid = self::isUserNameFree($user);
|
||||||
else
|
else
|
||||||
$valid = self::isUserNameFree($user, $this->id);
|
$valid = self::isUserNameFree($user, $this->id);
|
||||||
|
|
||||||
if(! $valid)
|
if(!$force && ! $valid)
|
||||||
throw new UserInvalidException();
|
throw new UserInvalidException();
|
||||||
|
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
@ -37,7 +37,7 @@ class ClubsViewUser extends HtmlView
|
|||||||
$dataurl = $input->get->get('data', null, 'json');
|
$dataurl = $input->get->get('data', null, 'json');
|
||||||
$data = json_decode($dataurl, true);
|
$data = json_decode($dataurl, true);
|
||||||
|
|
||||||
$this->user->setUser($data['user']);
|
$this->user->setUser($data['user'], true);
|
||||||
$this->user->setName($data['name']);
|
$this->user->setName($data['name']);
|
||||||
$this->user->setAddress($data['address']);
|
$this->user->setAddress($data['address']);
|
||||||
$this->user->setCity($data['city']);
|
$this->user->setCity($data['city']);
|
||||||
|
@ -10,7 +10,8 @@ defined('_JEXEC') or die;
|
|||||||
<table width='100%' class='table table-stiped, table-hover'>
|
<table width='100%' class='table table-stiped, table-hover'>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width='30%'>Benutzername</th>
|
<th width='15%'>Benutzername</th>
|
||||||
|
<th width='20%'>Name</th>
|
||||||
<th width='30%'>Ort</th>
|
<th width='30%'>Ort</th>
|
||||||
<th width='30%'>E-Mail</th>
|
<th width='30%'>E-Mail</th>
|
||||||
<th width='5%'>Löschen?</th>
|
<th width='5%'>Löschen?</th>
|
||||||
@ -20,6 +21,7 @@ defined('_JEXEC') or die;
|
|||||||
<?php foreach($this->users as $user): ?>
|
<?php foreach($this->users as $user): ?>
|
||||||
<?php $link = Route::_('index.php?option=com_clubs&view=user&id=' . $user->getId()); ?>
|
<?php $link = Route::_('index.php?option=com_clubs&view=user&id=' . $user->getId()); ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($user->getUser()); ?></a></td>
|
||||||
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($user->getName()); ?></a></td>
|
<td><a href='<?php echo $link; ?>'><?php echo htmlentities($user->getName()); ?></a></td>
|
||||||
<td><?php echo htmlentities($user->getCity()); ?></td>
|
<td><?php echo htmlentities($user->getCity()); ?></td>
|
||||||
<td><a href='mailto:<?php echo htmlentities($user->getMail()); ?>'><?php echo htmlentities($user->getMail()); ?></a></td>
|
<td><a href='mailto:<?php echo htmlentities($user->getMail()); ?>'><?php echo htmlentities($user->getMail()); ?></a></td>
|
||||||
|
Loading…
Reference in New Issue
Block a user