incomplete + untested team feature

- picked from branch alix5-feature-team + adjusted,
  needs more adjustments for alix6 + PDO_MySQL