Preferences.php: avoid "Undefined index" if key 'realname' don't exist in $formdata

Added additional check for missing key "realname" in $formData which can cause
an undefined index: realname

Bug: 62029
Change-Id: I6763c12d9b4d8b1e574eb3162168f4f5380df93a
Merge "Preferences.php: avoid "Undefined index" if key 'realname' don't exist in $formdata"