incomplete + untested team feature

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