Why can't you use Departments and assign managers that way?
If you want to hack the source code, the edit user page is generated by the JavaScript code in:
workflow/engine/templates/users/users.js
This page is displayed by:
workflow/engine/methods/users/usersEdit.php
When the user form is submitted, it is processed by:
workflow/engine/methods/users/usersAjax.php
Look for the code under:
Code: Select all case 'saveUser':
case 'savePersonalInfo':
I don't recommend hacking the source code. It is much easier to simply add your directory structure in a PM table and query that and use Value Based Assignment, instead of Reports To assignment for your tasks.