src/CRUDlex/UserProvider.php
protected function loadUserRolesViaData($userId)
    {
        $crudRoles = $this->userRoleIdentifier->listEntries(['user' => $userId], ['user' => '=']);
        $roles = ['ROLE_USER'];
        if ($crudRoles !== null) {
            foreach ($crudRoles as $crudRole) {
                $role = $crudRole->get('role');
                $roles[] = $role['name'];
            }
        }
        return $roles;
    }
protected function loadUserRolesViaData($userId)
    {
        $crudRoles = $this->userRoleIdentifier->listEntries(['user' => $userId], ['user' => '=']);
        $roles = ['ROLE_USER'];
        if ($crudRoles !== null) {
            foreach ($crudRoles as $crudRole) {
                $role = $crudRole->get('role');
                $roles[] = $role['name'];
            }
        }
        return $roles;
    }
protected function loadUserRolesViaData ( $ userId ) { $ crudRoles = $ this -> userRoleIdentifier -> listEntries ( [ 'user' => $ userId ] , [ 'user' => '=' ] ) ; $ roles = [ 'ROLE_USER' ] ; if ( $ crudRoles !== null ) { foreach ( $ crudRoles as $ crudRole ) { $ role = $ crudRole -> get ( 'role' ) ; $ roles [ ] = $ role [ 'name' ] ; } } return $ roles ; }
Loads the roles of an user via an AbstractData instance.

@param mixed $userId
the id of the user

@return string[]
the roles of the user
Loads the roles of an user via an AbstractData instance .