info:concrete5:58:users

users / membres / utilisateurs / permissions

https://documentation.concrete5.org/developers/users-groups/reading-data-existing-users

<?php
defined('C5_EXECUTE') or die("Access Denied.");
use Concrete\Core\User\User;
$u = new User();
$ui = UserInfo::getByID($u->getUserID());
 
//find if the current user is member of group admin and redirect to another page
$groups = $u->getUserGroups();
$isadmin=0;
foreach($groups as $groupID) {
    $group = \Concrete\Core\User\Group\Group::getByID($groupID);
    if($group->getGroupName() =="Administrators") {
      $isadmin=1;
    }
}
if($isadmin==1){
     $r = Redirect::to('/dashboard/welcome/me');
    $r->send();
    exit;
}
 
// if the current user is superadmin
if ($u->isSuperUser()) {
}
  • info/concrete5/58/users.txt
  • Dernière modification: 2020/05/08 06:57
  • par radeff