public function getUserRoute($route, array $user) {
        $route = Configure::read('User.routes.' . $route);

        if (!$route) {
            return null;
        }

        $route = (array) $route;

        foreach ($route as &$value) {
            if ($value === '{id}') {
                $value = $user['id'];

            } else if ($value === '{slug}' && isset($user['slug'])) {
                $value = $user['slug'];

            } else if ($value === '{username}') {
                $value = $user[Configure::read('User.fieldMap.username')];
            }
        }

        return $this->url($route);
    }