Save (encrypted) password with Powermail (TYPO3) - typo3

I use powermail to create fe_users for TYPO3, which works fine so far.
Only the password is written in plain text in the DB, do any of you have an idea how to manage that the password is stored encrypted after saving?

If you want to add fe_users records with powermail (I would use a registration extension for this task), then you could use finisher methods (see https://github.com/einpraegsam/powermail/blob/develop/Documentation/ForDevelopers/AddFinisherClasses.md) and convert the password before saving.
If you are using the existing saveToAnyTable finisher, you could use a TypoScript UserFunc for the field password. That could convert the value.

Related

how to prevent updating a field in CakePHP 3 beforesave()?

In my form, if an input field is not changed, I don't want to update that particular field in database. How can I achieve this in beforesave() ? I tried $entity->unset($fieldName); but that doesn't work.
UPDATE:
In my form, for one filed, I am saving encrypted data in database, and in beforeFind(), if this field is not null in database, this input is set to "*** ***". My encryption code for this field is in beforeSave(). I want to update this field only if it is not "*** ***".
my code is working fine when $entity->unset($fieldName); changed tounset($entity->$fieldName);

Remove a field from felogin extension's backend typo3

I need to remove certain fields like company, email etc from fe_users backend for my felogin extension. How it is possible with typo3 7.6?
What fields are available in the backend is determined what is written in the TCA. You might remove the fields from TCA, but that could cause problems if there is some code which assumes the fields exist.
So it's better to remove the fields only from the display list ($GLOBALS['TCA']['fe_users']['interface']['showRecordFieldList']).
use a file /Configuration/TCA/Overlay/fe_users.php to modify the global TCA.
use TSconfig to disable the fields. e.g. TCEFORM.fe_users.company.disabled = 1

TYPO3 / Formhandler / Make formhandler records editable?

Is it possible to make formhandler records editable and even show and sort by
- lets say - name and lastname in TYPO3 BE?
Thanks in advance.
I lately made a dummy extbase extension for a customer. Formhandler stores its data in these tables. Thus they are accessible as usual in the backend. They are sortable and editable and anything you like.
Have a look at http://typo3blogger.de/newsletteranmeldung-mit-formhandler-turchen-14/ There I have created an example how to create records in TYPO3 with formhandler and Finisher_DB. In newer versions please use Finisher\DB
Here are all properties of the Finisher\DB of formhandler:
http://www.typo3-formhandler.com/documentation/finisher/finisherdb/
Use ifIsEmpty to fill up fields with a default value. F.e. if you don't have this field in your form.
at http://pi-phi.de/formhandler.html I documented (in german) how I used formhandler to generate tt_news records with categories.
the tt_news records needs a confirmation of an admin, so the admin gets a mail

Why can't magento accept `content` as a database field name?

I am creating a new module and in that module I add a form which has a field name content in the database.
Now when I add a wyswig editor in this form with the field name content in the database, the layout of the form in the backend changes completely as compared to default layout.
But when I changed the database field name from content to any other name lets say content_html or content_h etc etc., the layout of the form now appeared as a default form.
This happens only when I use wyswig editor, and without wyswig if I create simple form it accepts the values in the database under the content field name.
Why can't magento accept the content as a field name, using wyswig editor.
the problem is that magento sets the id of the element to same as the name and the id
content is already present:
<div class="main-col" id="content">
try to set a prefix to your for your form
$form->setHtmlIdPrefix('something_')
that should fix it

Symfony 1.4 Form Creater

Need: Ability to dynamically build Forms
Structure (simple idea not actual structure)
Admin: Form Assignment, where you create what field you want your new Form to have
FrontEnd: Where the New form will be implemented (this is the root of this question)
FronEnd Storage: When the New form is filled out the data points are written to a set of tables
The idea is simple enough, Go into Admin, select the fields, fieldType, and Labels you want
I.E.
Field Name:*Enter a specific field name, like f_name or email
FieldType: [Text, TextArea, Password, Radio, DatePicker, CheckBox, Select, etc]
Label: What to display on the resulting form, f_name = First Name, etc
Then I hit a page on the FrontEnd where the New form is generated, I fill it out and voila the data is stored in the FrontEnd Storage tables.
So the question is, idea's on how to accomplish this, I already have the Admin section done, it's dynamically building and appropriately binding a frontEnd From that I would like advice on.
Currently my idea is to simply make a shell form that is a huge ugly switch statement that builds sfForm elements and appropriate validators for each field (fields given from what was entered in the Admin area)
I feel this is the 'wrong' way to do it, I did find a plugin 'spyFormBuilderInterface2Plugin' which is old and build for propel not doctrine, but this is the basic idea of what I am after. So how would YOU do it?
Please note I am not looking to Dynamically ADD forms to a current form, I can already do this and it's exactly what is implemented in my Admin section, I need to take data a create a whole NEW form programatically
I've created something like you described, just the way you said.
I have a model FormDefinition which defines a form, and has a collection of FormFields. Each form field has a widget_class, widget_options, validator_class and validator_options.
I have a custom myForm which needs a FormDefinition in it's constructor. In the setup() of myForm, I loop through all fields a instantiate the widgets and validators.
Beacuse in our solution, we needed/wanted to store all form data in separate tabels. My myForm extends from sfDoctrineForm, and my backend has some logic which creates/updates the (php) model and database definition, by just calling the appropriate Doctrine methods. But you could also create an EAV store.