SessionUserfunc

User functions in context with the session management.

SetXblogVar

Write any value of an xBlog variable to the session.

  // Sample:
  // Write the current value of the URL param tx_blog[pointer] into the session for the tx_blog array with the element 123
  // 123 (if uid is 123), mypointer, GP:tx_xblog|pointer
  //
10 = USER
10 {
  userFunc = Netzmacher\Xblog\UserFunc\SessionUserfunc->SetXblogVar
  uid = TEXT
  uid {
    field = uid
  }
  param = TEXT
  param {
    value = mypointer
  }
  value = TEXT
  value {
    data = GP:tx_xblog|pointer
    intval = 1
  }
  dontClearCache = 0
}

Get the value from above from the session

  // Sample:
  // Get the param mypointer from the session from the tx_blog array with the element 123
  // data = session: tx_blog|123|mypointer
  //
data {
  cObject = COA
  cObject {
    10 = TEXT
    10 {
      value = session: tx_xblog|
    }
    20 = TEXT
    20 {
      field = uid
    }
    30 = TEXT
    30 {
      value = |mypointer
    }
  }
}

SetXblogVarExclusive

Same as SetXblogVar, but value will set only, if receive mode of the current plugin is “exclusive”

10 = USER
10 {
  userFunc = Netzmacher\Xblog\UserFunc\SessionUserfunc->SetXblogVarExclusive
  // see sample above at SetXblogVar