Skip to main content

aktuellen User in Variable speichern

Comments

9 comments

  • Zendesk API User
    Author: zava - 3/18/2014 12:54

    Hi Marcel,

    do you mean FS's user or Frontend's user?

    ciao,

    Antonio

    0
  • Zendesk API User
    Author: MarsDD - 3/18/2014 12:56

    Hi Antonio,

    I mean the frontend user who is equals the fs user.

    best regards

    Marcel

    0
  • Zendesk API User
    Author: zava - 3/18/2014 13:13

    Sorry I'm quite confused,

    you want to read a FS user from the Live system, not Preview not Webedit, Live?

    0
  • Zendesk API User
    Author: MarsDD - 3/18/2014 13:18

    Following situation

    in one dataset you selected your user from a dropdown element

    after that, in preview && webedit you can see all datasets with this user property because the user in the table and the fs users are the same.

    i hope u could understand me

    0
  • Zendesk API User
    Author: zava - 3/18/2014 13:45

    like this...

    <%@ page import="de.espirit.firstspirit.access.*" %>

    <%@ page import="de.espirit.firstspirit.access.project.Project" %>

    <%

      Connection connection = (Connection) session.getAttribute("connection");

      if (connection != null) {

      Project project = (Project) connection.getProjectByName("agv");

      UserService us = project.getUserService();

      User loggedInEditor = us.getUser();

     

      if (loggedInEditor != null) {

         String loggedInEditorName = loggedInEditor.getRealname();

         String loggedInEditorEMail = loggedInEditor.getEMail();

         out.println(loggedInEditorName);

      }

      }

    %>

    0
  • Zendesk API User
    Author: MarsDD - 3/18/2014 13:50

    ofc

    and now ... my problem is ... how could i save the result of this code in a fs-variable?

    if i do around a cms_set ... and put out the length, i dosn't get real result length (like from "Marcel" => 6) but i get the length of this jsp-code (like 260).

    0
  • Zendesk API User
    Author: zava - 3/19/2014 8:37

    Hi Marcel,

    no way :smileyhappy: you can not save the result on cms variable.

    Why you need a CMS var?

    0
  • Zendesk API User
    Author: MarsDD - 3/19/2014 8:39

    Hi Antonio,

    because i need it for a contentSelect

    0
  • Zendesk API User
    Author: zava - 3/19/2014 8:46

    ok on header, can you not migrate the function to JSP :smileyhappy: ?

    just change the render time from CMS to JSP, on JSP you have all information you need :smileyhappy:

    0

Please sign in to leave a comment.