Skip to content

Instantly share code, notes, and snippets.

@twmbx
Forked from clouddueling/routes.php
Created August 1, 2013 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twmbx/6131988 to your computer and use it in GitHub Desktop.
Save twmbx/6131988 to your computer and use it in GitHub Desktop.
Event::listen('404', function()
{
$username = URI::segment(1);
$user = User::where_username($username)
->where_type('account')
->first();
if ($user != null) {
if ($user->username != '') {
return Controller::call('website@view', array($user->id));
}
}
return Response::error('404');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment