/**
* @inheritdoc
*/
public function insert($table, $columns)
{
if ($table != '{{%auth_item}}' || !isset($columns['name'])) {
return parent::insert($table, $columns);
}
$item = (new \yii\db\Query())->from($table)->where(['name' => $columns['name']])->exists();
if (!$item) {
return parent::insert($table, $columns);
}
}