Problem/Motivation
I use the following code to create an users profile after I have created the user.
$public_profile = Profile::create([
'type' => 'publiek',
'uid' => $this->user->id(),
'field_initialen' => $this->data['field_initialen'],
'field_voornaam' => $voornaam,
'field_tussenvoegsels' => $tussen,
'field_achternaam' => $achternaam,
'field_e_mailadres' => $this->data['field_e_mailadres'],
'field_website' => $this->data['field_website'],
'field_specialisatie' => $this->data['field_specialisatie'],
'field_gesproken_taal' => $this->data['field_gesproken_taal'],
'field_geo_lat_lng' => $this->getGeoVal(),
'address' => [ $this->data['visiting_address'], $this->data['post_address'] ],
]);
$public_profile->setDefault(TRUE);
$public_profile->save();
$public_profile->setActive(TRUE);
$public_profile->save();
This works fine. Both the user (code not here...) and their profile are created and I can work with it for a while.
Then after some time ( I have not yet figured out how long) all profiles have gone. The users still exist, but the profiles are vanished,
Steps to reproduce
Not sure. but assuming using above code (using a profile type called 'publiek') perhaps without the custom fields.
A difficulty with reproducing this however is: It takes some time.
Comments
Comment #2
rop commentedComment #3
rop commentedI was a bit desperate when I posted this...turns out it was my own function deleting them for testing purposes. I had forgotten about it and it was in the most unlogical place...
Sorry to have bothered you...