Minor - format code
Fixing UI see #6833
Using function in order to load search forms #6833
Minor - format code, fix php warning.
Moving user profile as a controller.

* Adding profile_url in the api_get_user_info() array
* Removing myfiles.php likes and page. This will be added in a new
controller.
Removing myfiles.php.
Some pages inside main/ don't need to have a course validation like
messages/social/auth/course catalog, etc.