Get the previous information of one user by the another by using the same controller

please tell me how to get the information of one user by the
another with in the same controller? is it possible? please tell me the
solution with some example ?
and also tell me how to get the related information when the user using
the select list?

sir,
i have two control panels one for mentor and another for student and i
have also one course controller with course table
here mentor create the courses?

my task is student can select the courses which are created by the
mentor?
here the mentor and the student are the separate users?

please tell me how to get the mentor courses by the student?

give me the solution with some code

Thanks,