Creating A Login Page Within WordPress

Now DAP already provides you with a built-in login form, at YourSite.com/dap/login.php

But if you want to put this form “within” your WordPress blog, so as to give your login form the same Look & Feel as the rest of your blog, all you need to do, is…

1) Create a WordPress “Page” (not ‘post’) with the text %%LOGIN_FORM%% in the body of the page, and a title of say, Login, and save the new page. If you used the text “Login” for the title, then the actual link to this page would be YourSite.com/blog/login

2) This page now shows up as “Login” along with the rest of your “pages” on your blog.

3) Go to DAP Admin > Config > Advanced (drop down). Scroll down to the field that says:

Location of your login page (eg., if using WordPress). Should start with a forward slash (`/`)

In the text box, enter the link to the login page from Step 1, minus the domain name. So, it would look like:

/blog/login

That’s it!

When someone clicks on the “Login” link, or tries to access a post that they are not authorized to, the user is redirected to the login page.

Related: Where is the Logout Link?

18 comments ↓

#1 Fern on 05.28.09 at 6:48 pm

This would be a perfect place to give the logout info.

#2 Ravi Jayagopal on 05.28.09 at 6:59 pm

Fern,

Great feedback. Done!

(see updated post above)

- Ravi Jayagopal

#3 enlightenmental on 12.30.09 at 12:05 pm

I notice that when a user logs in through DAP, they are not logged into wordpress.

we have WP users and DAP users linked, so when a user is created through DAP, they are also created as a WP user

Am i missing something?

one would assume when the user logs in through DAP, they are also logged in to wordpress

and when logging out of DAP, they are logged out of wordperss

?

#4 Ravi Jayagopal on 12.30.09 at 12:10 pm

For that to happen, you need to be using DAP v3.4, and must have turned on “WP User Sync” in your DAP Config (“Advanced”).

#5 enlightenmental on 12.30.09 at 12:11 pm

update:

I see that users created are linked correctly
and when they login through DAP, they are logged into wordpress

however, when they logout of DAP, they are still logged into wordpress

#6 enlightenmental on 12.30.09 at 12:12 pm

I’ve also noticed, when the “admin” DAP user logs in, they have no access to product content, and i am unable to add that product to the admin user…

?

#7 Ravi Jayagopal on 12.30.09 at 12:24 pm

@enlightenmental,

>>I’ve also noticed, when the “admin” DAP user logs in, they have no access to product content, and i am unable to add that product to the admin user< <

That is a deliberate feature, of not giving admin default access to all products, because the first thing you tend to do after protecting a post, is to see if it works. And if the admin can get to it, then they start wondering why the post is not being protected. So it's a feature to protect newbie users from inadvertently thinking that the product doesn't work :-)

To give admin (or any user) access to a product, go to Users>Manage, check on the checkbox next to the Admin (or that user’s email), then, from dropdown on top-right, select product name to which you want to provide access, and click on “Give selected users access to product”.

Feel free to open a ticket and we’ll help you figure it out.

- Ravi Jayagopal

#8 enlightenmental on 12.30.09 at 12:33 pm

i see that now, thank you

it looks like it duplicates the user depending on how many products you add to them (which will be confusing for the end admin user) I assumed the user would get additional products listed in the “product name” table row, rather than duplicating the user

while we’re on the subject, our particular site has three product levels

- Free
- Gold
- Platinum

platinum has access to platinum, gold and free content

Im assuming by default, there is no way to have the product “include” other products…

and if I want the platinum to have access to gold, i will need to add the “gold posts” to the platinum product as well?

thank you
(so far DAP is stellar)

#9 enlightenmental on 01.05.10 at 11:56 am

Possible Bug:

When the user logs into DAP, they are logged into wordpress.

When the user logs out of DAP, they are still logged into wordrpess

the user needs to be logged out of both

#10 Ravi Jayagopal on 01.05.10 at 12:28 pm

Actually, we haven’t implemented the “universal logout” feature yet.

It’s low on our priority list, but we’ll get there sooner than later.

Thanks for the feedback!

- Ravi Jayagopal

#11 EnlightenMental on 01.18.10 at 4:09 pm

hey Ravi,

random question for you,
I have another project I’m starting, but this is a WPMU + Buddypress install

I’m going to assume DAP has not been tested on WPMU using the buddypress plugin

does it work?

if not, how much to get DAP working with WPMU + Buddypress

please feel free to email me

enlightenmental[at]gmail[.]com

#12 Amy on 03.30.10 at 12:54 am

Anyone successfully install a dap horizontal login/logout in the header are of WordPress?

I tried, and I can log into my DAP dashboard, but can’t access the material. I embedded the script and form code from the DAP login into the header.php file. It doesn’t look right yet, but I’d love any thoughts on how to make this work.

site: thedreamtribe.com (still under construction)

Thanks,
Amy

#13 Amy on 03.30.10 at 12:54 am

P.S. the password retrieval works.

#14 Amy on 03.30.10 at 4:32 pm

Got it to work.

#15 Peretz on 05.01.10 at 3:02 pm

I want to apply CSS to the login form or at least customize the login.php. So I edited the login.inc.php in dap/inc/content but my changes don’t show up.

Am I editing the wrong code?

#16 Paul on 05.21.10 at 10:21 am

How to I lock the whole Wordpress site?

I don’t want people seeing the sidebars etc..

#17 Ravi Jayagopal on 05.21.10 at 11:03 am

If you protect every single post on your blog, then it will redirect your non-logged-in visitors to the URL that you have set in Config > Advanced that says “URL where users will be redirected to if there are no posts available for display”.

- Ravi Jayagopal

#18 Merge Tags in WordPress Posts — DAP Documentation on 05.24.10 at 6:46 pm

[...] is better suited for a WP “page”. This text will be replaced by a login form using which your members can log in to your membership [...]

Leave a Comment