News

New Feature: Custom Member Profile URLs

August 12, 2009
by Ryan Masuga

Devot:ee now has a custom member profile URL feature. You can now optionally select what your profile URL is, which provides a little more personality, and it was fun to implement, besides.

I added a new custom member profile URL feature on devot:ee. Now you have the option to select what your profile URL is. This was done with a combination of the Solspace User module and some PHP on a couple templates. I implemented this feature for a few reasons:

1) The number of members on devot:ee is our business. Literally.

Before implementing this, anyone could just increment the number on any member profile URL to determine how many members there are (and this goes for any ExpressionEngine site using the member id in the URL of a member profile page). You just keep going until you get an error. Some sites may not want this knowledge available, and devot:ee happens to be one of those sites.

2) A wee bit more secure

Using a generated segment (using our secret homemade recipe) or letting a user pick their own helps keep member ids and usernames off the site. I thought about just using a user’s username, but that’s one half of someone’s login info, so I thought I’d push this a little further to keep both the member_id and username out of the URL. If you want to update your custom segment to match your username, go for it–that’s up to you.

3) You’re not just a number!

It’s always nice to personalize things a bit. For example, now you can find my profile at http://devot-ee.com/members/profile/ryan-masuga/ rather than the more anonymous http://devot-ee.com/members/profile/1/. I could just as easily have made my URL devot-ee.com/members/profile/monkeymaster/ (which is totally available as I write this). You can still get your member ID if you need to – it’s now listed on your member profile page if you’re logged in.

4) Because I can

Devot:ee is different things to different people, and for me it is part playground and part laboratory – a place to do things that I may not be able to do on a client site. One of the things on my to-do list was to make member profile URLs that didn’t contain a member_id or a username. I just wanted to know if I could do it.

Select a custom member profile URL with live searching.

When a user registers, they are given an automatically generated user segment similar to: devot-ee.com/members/profile/user67826190/. They can then go into their profile at any time to change this to whatever they want, provided their custom segment is available. I’ve implemented a live lookup as you type to see if the segment you’re typing is already in use. Similar to Facebook, you can update this custom URL segment once. If you need to change it again, you can just contact me and we’ll take care of it. You’ll know that you’ve updated at least once because the field will no longer be available to you on the edit page. I did this so people are thoughtful and not just changing this willy-nilly.

So, if you’ve already signed up in the past, you’ve been assigned a custom profile URL segment already. Just log in and go to your member page to change yours. If you don’t want to update it, no worries. Just carry on, and happy ExpressionEngineering!

4 Comments:

Florian Schroiff 08.12.09

Coolness. Will you be releasing this as an Extension anytime soon? ;)

angie 08.13.09

angie

Impressive. I’d like to know how that was done!! :)

wecreateyou 08.13.09

wecreateyou

This functionality would make an awesome addon Ryan. Was it very difficult to implement?

Is it a custom extension, module or both that you’ve developed to make this possible?

OrganizedFellow 08.13.09

Wasn’t something similar to this a great big even for FaceBook a few months ago?

:)

Glad to be one of the ‘cool kids’.

You must be registered member to comment. If you're already a member, log in now, and if not go register (it's free and easy!).