Commit 20f814d4 authored by Stefan Busemann's avatar Stefan Busemann
Browse files

Merge branch 'bugfix/corrects-extended-model-and-add-missing-field' into 'develop'

Correct extended user model and add terms_version

See merge request !20
parents 75ea64c4 00e1e3a1
Pipeline #3439 passed with stages
in 5 minutes and 3 seconds
......@@ -3,13 +3,10 @@ declare(strict_types=1);
namespace T3o\T3omy\Domain\Model;
use TYPO3\CMS\Extbase\Domain\Model\FrontendUser;
/**
* Class UserProfileRepository
*/
class MyProfile extends FrontendUser
class MyProfile extends \In2code\Femanager\Domain\Model\User
{
/**
* @var string
......@@ -26,6 +23,11 @@ class MyProfile extends FrontendUser
*/
public $facebook = '';
/**
* @var string
*/
public $termsVersion = '';
/**
* @return string
......@@ -75,4 +77,21 @@ class MyProfile extends FrontendUser
$this->facebook = $facebook;
}
/**
* @return string
*/
public function getTermsVersion()
{
return $this->termsVersion;
}
/**
* @param string $termsVersion
* @return void
*/
public function setTermsVersion(string $termsVersion)
{
$this->termsVersion = $termsVersion;
}
}
......@@ -25,18 +25,22 @@ $feUsersColumns = [
'type' => 'input',
]
],
'terms_version' => array(
'exclude' => 0,
'label' => 'Version of accepted terms',
'config' => array(
'type' => 'input'
),
),
];
$fields = 'github, twitter, facebook,';
$fields = 'github, twitter, facebook, terms_version';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'fe_users',
'github, twitter, facebook',
'github, twitter, facebook, terms_version',
'',
'after:name'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $feUsersColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'fe_users',
'--div--;LLL:EXT:femanager/Resources/Private/Language/locallang_db.xlf:fe_users.tab, ' . $fields
);
......@@ -13,7 +13,7 @@ $EM_CONF[$_EXTKEY] = array(
't3o_slack' => '0.1.0-',
'fluid_styled_content' => '7.6.0-8.99.99',
'userprofile'=> '0.0.1-',
'femanager' => '3.1.0-'
'femanager' => '4.0.0-'
),
'conflicts' => array(
),
......
......@@ -5,4 +5,5 @@ CREATE TABLE fe_users (
github VARCHAR (255),
twitter VARCHAR (255),
facebook VARCHAR (255),
terms_version VARCHAR (255)
);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment