Skip to content

Instantly share code, notes, and snippets.

@hasokeric
Forked from clouddueling/routes.php
Created February 28, 2013 01:13
Show Gist options
  • Save hasokeric/5053369 to your computer and use it in GitHub Desktop.
Save hasokeric/5053369 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