BlogCFC User Manager

BlogCFC I have, apparently, been using BlogCFC for 465 days now! I love it! Its great! One of these days I'll put some thing Ray's way from his wish list.

I use BlogCFC myself and I've integrated it into Farcry for Dott and I've also recently set up a copy of BlogCFC for one of the Dott Projects, New Urban Farmers.The New Urban Farmer's Blog is for people who are involved in the project to post their stories and updates as the project progresses. This means that there is potential for a lot of posters/users on one blog.

BlogCFC can quite happily handle multiple users, but there's no way to manage them other than to hack them into the database. I didn't really want to be having to add records to the database everything the Senior Producer on the project needed someone new adding, so I finally got around to writing a user manager component.

It's not massively complicated and I have some ideas for extending it (and BlogCFC) to allow better security for admin, moderator and author functions within the admin, but here's a first draft.

Download the attached rar file and drop the files into the appropriate places on your blog.

You'll need to add the following line to your Application.cfm to load the component.

view plain print about
1<!--- load User --->
2<cfset application.user = createObject("component", "org.camden.blog.users")>

And the next line somewhere in the adminlayout.cfm, so that you can access the page from the admin.

view plain print about
1<li><a href="user.cfm">Users</a></li>

The User manager gives you a list of the users in the database and links through to a form that allows you to edit the user's details.

You'll notice that there's a "Generate Password" tick box. If you clear the password and confirm password input boxes and check this box, a lower case phonetic password will be created for you. At the minute you'll need to go back into the form to see the new password, which is mildly annoying, but it works for the now.

To give credit where credit is due; the password generator is based on a tag written by Fabien Meghazi called aGrPassword, which was apparently inspired a javascript function by Michael Hoffman. The tag was starting to look a little bit old, so I took it apart and put it back together as too cfc methods, but is basically the same code with a new spin on it.

Other things I'm thinking about looking at with this....

  • Allowing management of users for multiple blogs
  • Restricting users to a specific blog
  • Multiple Role types (which I mentioned already)

Any other suggestions?

Anyway, on with work, I hope you find this component useful.

TweetBacks
Comments
This sounds good Stephen, i'll download and have a play. It's something that has been missing in BlogCFC.
# Posted By Nick Tong | 3/13/08 9:39 PM
Hey Stephen, Have you done any more with this, or did you find this implementation worked well?
# Posted By nick tong | 3/13/08 9:39 PM
To be honest it met a requirement and I never got around to extending it any further.

Was there something specific you were after?
# Posted By Stephen Moretti | 3/13/08 9:39 PM
Basically i need a public login system where users can login and see posts that have been assigned to them only. One not use email i hear you ask (maybe) - RSS, comments.
# Posted By nick tong | 3/13/08 9:39 PM
Hey Stephen, @ line 93 of user.cfc you have 'VALUE' and not 'VALUES' - it cause an issue om MSSQL.
# Posted By Nick Tong | 3/13/08 9:39 PM
Hi there. I realize that I am writing this comment months after you originally posted this, but in your post you refer to an attached rar file. I'm guessing that maybe you have since removed the ability to download it as I can not see a link for it anywhere on your page.

Is the user manager still available?

Thank you very much.
# Posted By Cory Adams | 12/19/08 1:38 PM
Cory,

I changed blog software and unfortunately MangoBlog doesn't support enclosures yet, so the links to downloads have been lost. However, this link should work http://nil.checksite.co.uk/enclosures/blogcfcuserm...

I'm not sure how good the code is any more though I'm afraid, but feel free to use and abuse it as you wish.
# Posted By Stephen Moretti | 12/19/08 1:45 PM