Edit user: Prevent overwriting first and last name if temporary disabled

This commit is contained in:
Igor Scheller 2019-08-24 12:53:26 +02:00
parent a51bfae6e5
commit a02f5e61be
1 changed files with 4 additions and 2 deletions

View File

@ -268,8 +268,10 @@ function admin_user()
$user_source->name = $nickValidation->getValue(); $user_source->name = $nickValidation->getValue();
} }
$user_source->save(); $user_source->save();
$user_source->personalData->first_name = $request->postData('eVorname'); if (config('enable_user_name')) {
$user_source->personalData->last_name = $request->postData('eName'); $user_source->personalData->first_name = $request->postData('eVorname');
$user_source->personalData->last_name = $request->postData('eName');
}
$user_source->personalData->shirt_size = $request->postData('eSize'); $user_source->personalData->shirt_size = $request->postData('eSize');
$user_source->personalData->save(); $user_source->personalData->save();
$user_source->contact->mobile = $request->postData('eHandy'); $user_source->contact->mobile = $request->postData('eHandy');