SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: User admin their own pages
-
Apr 5, 2006, 06:58 #1
- Join Date
- Apr 2006
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
User admin their own pages
Ive been teaching myself ruby and RoR for a month or so now...and... I'm stuck!
The particular project Ive been attempting to build (while learning) is a simple profile site with templates. For example - choose a user name then a theme and fill in the blank comment boxes. Your page is generated at sitename.com/username
No thing too original or complex.
I have a sign up / log in / log out section working and I have been trying to work out how each user, once they have logged in, can have their own administer page - like myspace / blogger etc and was wondering the best way to do that. A broad question I know but none of the tutorials I read comment on user control.
I'm a HTML / css designer so this is all new to me!
ANY advice would be great. I'm still reading through tutorials so hopefully all will come clear in time.
-
Apr 5, 2006, 07:17 #2
Probably the easiest method:
If you're setting a session-level variable with the user's information after they log in, check for the existence of the user variable and see if the page they're viewing is the page they're allowed to edit (for example, by searching a database).
If it's not that person, show a regular profile page.
If it is the right person, show populated form fields where their text would normally be so they can edit their info.
-
Apr 5, 2006, 09:06 #3
- Join Date
- Apr 2006
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks, but im still totally confused about how to do that. Are there any examples of some thing similar online?
Bookmarks