main/core/Manager/RoleManager.php
public function initializeLimit(Role $role)
    {
        $count = $this->countUsersByRoleIncludingGroup($role);
        $role->setMaxUsers($count);
        $this->om->persist($role);
        $this->om->flush();
    }
public function initializeLimit(Role $role)
    {
        $count = $this->countUsersByRoleIncludingGroup($role);
        $role->setMaxUsers($count);
        $this->om->persist($role);
        $this->om->flush();
    }
public function initializeLimit ( Role $ role ) { $ count = $ this -> countUsersByRoleIncludingGroup ( $ role ) ; $ role -> setMaxUsers ( $ count ) ; $ this -> om -> persist ( $ role ) ; $ this -> om -> flush ( ) ; }
This functions sets the role limit equal to the current number of users having that role.

@param Role $role
This functions sets the role limit equal to the current number of users having that role .