mirror of
https://github.com/webmasterskaya/joomla-oauth-server.git
synced 2024-11-23 22:34:50 +03:00
Добавил getItemByIdentifier в ClientModel
This commit is contained in:
parent
dc4b1734ab
commit
58a6631164
@ -9,6 +9,8 @@ use Joomla\CMS\MVC\Model\AdminModel;
|
||||
|
||||
class ClientModel extends AdminModel
|
||||
{
|
||||
use GetItemByIdentifierTrait;
|
||||
|
||||
/**
|
||||
* The type alias for this content type.
|
||||
*
|
||||
@ -17,15 +19,6 @@ class ClientModel extends AdminModel
|
||||
*/
|
||||
public $typeAlias = 'com_oauthserver.client';
|
||||
|
||||
/**
|
||||
* Client item.
|
||||
*
|
||||
* @var array|null
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected ?array $_item = null;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
* @param bool $loadData
|
||||
@ -87,10 +80,10 @@ class ClientModel extends AdminModel
|
||||
|
||||
if ($task === 'save2reset' || empty($table->id)) {
|
||||
$table->identifier = $this->generateNewIdentifier();
|
||||
$table->secret = $table->public ? '' : $this->generateNewSecret();
|
||||
$table->secret = !!$table->public ? '' : $this->generateNewSecret();
|
||||
}
|
||||
|
||||
if ($table->public) {
|
||||
if (!!$table->public) {
|
||||
$table->secret = '';
|
||||
} else {
|
||||
if (empty($table->secret)) {
|
||||
|
Loading…
Reference in New Issue
Block a user