evolution-cms / evolution

Welcome to the new evolution of MODX Evolution!
GNU General Public License v3.0
260 stars 95 forks source link

[3.1.3] Accessing User Role TVs #1961

Open BBloke opened 3 years ago

BBloke commented 3 years ago

Hi,

With the new change to single table users and assigned TVs via Role in v3.0+.

Is there a function which will pull the associated TV's for a user id?

We currently have:

$user = $modx->getWebUserInfo($modx->getLoginUserID()); $this->username = $user['username'];

Which pulls the user info. It would be nice if the same function pulled the TV's for the Users Role in too or a new function which just pulls the User's TVs.

Thanks, BBloke

mnoskov commented 3 years ago
\UserManager::getValues(['id' => $user_id]);

not documented yet

BBloke commented 3 years ago

That is awesome. Thanks @mnoskov