[buddypress-trac] [BuddyPress Trac] #6325: Route /me/*/ to /members/<me>/*/
buddypress-trac
noreply at wordpress.org
Thu Apr 14 19:03:00 UTC 2016
#6325: Route /me/*/ to /members/<me>/*/
------------------------------------+-----------------------
Reporter: DJPaul | Owner: DJPaul
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.6
Component: API - Rewrite Rules | Version:
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+-----------------------
Comment (by dcavins):
Thanks @r-a-y for the new patch. It works well for me. @DJPaul do you have
any feedback? This patch is a little different than what you were asking
for (`members/me/*` is the pattern, not `/me/*`), but I think it makes a
lot of sense to do it @r-a-y's way.
I was thinking about adding `me` to the list of illegal usernames in
`bp_core_get_illegal_names()`, but `bp_core_validate_user_signup()`
requires the username to be four characters long or more, so I guess that
rule will cover it.
I wrote up the most basic of tests (attached), and wonder if the logged-
out user test is exposing a problem. In the testing environment, if I
route a logged-out user to `members/me/`, I get a headers-already-sent
error:
`Cannot modify header information - headers already sent by (output
started at /tests/phpunit/includes/bootstrap.php:56)`
It works fine in my browser, but is the
`bp_core_set_uri_globals_member_slug` hook too late to be starting
redirects?
Thanks again for your work on this!
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6325#comment:18>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list