From version < 5.1 >
edited by sas
on 01.07.2020, 14:01
To version < 5.5 >
edited by sas
on 01.07.2020, 14:20
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -280,17 +280,15 @@
280 280  
281 281  == Make user data available to forms ==
282 282  
283 -The LDAP user data for the currently authenticated user are stored in the JavaScript object {{code language="none"}}window.XFC_METADATA.currentUser.ldap{{/code}} and can be accessed via JavaScript.
283 +The LDAP user data for the currently authenticated user are stored in the JavaScript object {{code language="none"}}window.XFC_METADATA.user.rawData{{/code}} and can be accessed via JavaScript.
284 284  
285 285  {{info}}
286 -The user data that will be retrieved for the current user depends on the (read) permissions of the user account used for the LDAP user lookup.
286 +Which data the JSON structure contains under the rawData property depends mainly on the read rights of the LDAP account, which executes the user search in the LDAP system.
287 287  {{/info}}
288 288  
289 -{{panel title="Example"}}
289 +To access the property ~/~/userPrincipalName~/~/ of the user from JavaScript, use the following code:
290 290  
291 -To access the property //userPrincipalName// of the user from JavaScript, use the following code:
292 -
293 -{{code language="javascript" title=""}}
291 +{{code language="javascript"}}
294 294  try {
295 295   // Auslesen der Property und Anzeige in einem Label
296 296   var elem = $('[name=txt1]');
... ... @@ -300,4 +300,3 @@
300 300   }
301 301  } catch (err) {}
302 302  {{/code}}
303 -{{/panel}}
Copyright 2000-2024