{"id":1798,"date":"2011-07-22T13:57:12","date_gmt":"2011-07-22T20:57:12","guid":{"rendered":"http:\/\/www.digitalaccesspass.com\/doc\/?p=1798"},"modified":"2014-11-29T23:58:04","modified_gmt":"2014-11-30T07:58:04","slug":"the-smart-login-process","status":"publish","type":"post","link":"http:\/\/digitalaccesspass.com\/doc\/the-smart-login-process\/","title":{"rendered":"The &#8220;Smart Login&#8221; Process"},"content":{"rendered":"<p>DAP has a very powerful, flexible and easy-to-use log in flow for your users and members.<\/p>\n<ul>\n<li>Log in from a dedicated log in page, or<\/li>\n<li>Log in from the login form on the side-bar (login\/logout widget), or<\/li>\n<li>Log in through the log in form shown on &#8220;Sorry, you don&#8217;t have access to this content. Please log in first&#8230;&#8221; kind of error messages.<\/li>\n<\/ul>\n<p>And we call it the <strong>Smart Login<\/strong>, because the login process will work differently under different conditions, all designed to make the user-experience for your member more smooth and consistent with general login standards around the web.<\/p>\n<p>So let&#8217;s see the various possible login locations in DAP.<\/p>\n<p>But first, it is important to note that DAP has two main types of logins.<\/p>\n<h3><strong>Primary Login<\/strong><\/h3>\n<p>This is where it is considered a &#8220;generic&#8221; login by your member. For eg., a member came to your web site, and then just generally wants to log in to the member&#8217;s area &#8211; so they have no &#8220;context&#8221; &#8211; it&#8217;s NOT as if they were trying to view a specific page or post, got challenged with a login form, and then logged-in from there. That makes this a &#8220;<strong>Primary Login<\/strong>&#8220;.<\/p>\n<p>Examples of this are&#8230;<\/p>\n<p>a) <strong>Dedicated Login Page<\/strong>: You have a dedicated login page, like http:\/\/YourSite.com\/login\/ &#8211; which is what you&#8217;ve entered in to &#8220;<strong>Setup &gt; Config &gt; Login URL<\/strong>&#8220;. The body of this page has the DAP merge tag for the login form, which is <strong>%%LOGIN_FORM%%<\/strong><\/p>\n<p>b) <strong>Login\/Logout Widget<\/strong> on any page of your web site. This is also considered a primary login. The reasoning here is that if they&#8217;re logging in through a sidebar widget, it means that they just want to log in to the member&#8217;s area, so it is considered primary login.<\/p>\n<h3>Secondary Login<\/h3>\n<p>This is a login action that HAS &#8220;context&#8221;. Say, a member landed deep into your site (not the home page, not the dedicated login page) and were challenged by the &#8220;In Page Error Message&#8221; that says something like &#8220;Sorry, you must log in before you can view this content&#8221; and are presented with a login form right on that very same page. They were trying to read something before they were asked to log in first &#8211; which means, they must be returned to the same page they were trying to view BEFORE they were asked to login. So that makes this a &#8220;<strong>Secondary Login<\/strong>&#8220;.<\/p>\n<p>Examples of this are&#8230;<\/p>\n<p>a) Any <strong>custom &#8220;Error Page&#8221;<\/strong>, where you have inserted the DAP merge tag for the login form,\u00a0<strong>%%LOGIN_FORM%%.<\/strong><\/p>\n<p>b) DAP&#8217;s &#8220;<strong>In-Page Error Message<\/strong>&#8221; which says &#8220;Sorry, this is private content &#8211; you must log in first before you can view this&#8221;.<\/p>\n<p>c) Log in form showing up on a page when &#8220;<strong>Sneak-Peek<\/strong>&#8221; is enabled.<\/p>\n<p>&nbsp;<\/p>\n<h3>Redirection Rules<\/h3>\n<p>Based on whether it&#8217;s a Primary Login or a Secondary Login, your member will be redirected to a different location.<\/p>\n<p>1) If it is a Primary Login action, then&#8230;<\/p>\n<p>a) They&#8217;re taken to the &#8220;Post-Login URL&#8221; if set at a Product-level AND they have access to just one Product.<br \/>\nb) They&#8217;re taken to the GLOBAL &#8220;Post Login URL&#8221; (under Setup &gt; Config) if you have NOT set anything at a Product-level, OR if they have access to more than one Product.<\/p>\n<p>This scenario is the only one where the Post-Login URL is ever used (whether it&#8217;s the Product-level or Global-level).<\/p>\n<p>1) If it is a Secondary Login action, then&#8230;<\/p>\n<p>They&#8217;re always redirected back to the same page they were on (or were trying to access) before they were challenged to log in first to view the content.<\/p>\n<p><strong>Bottom-line<\/strong>:<\/p>\n<p>Primary Login is predictable, and you (the DAP Admin) control where they go right after they login.<\/p>\n<p>Secondary Login depends on &#8220;context&#8221;, and they&#8217;re taken back to whatever page they were on, before they logged in.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DAP has a very powerful, flexible and easy-to-use log in flow for your users and members. Log in from a dedicated log in page, or Log in from the login form on the side-bar (login\/logout widget), or Log in through the log in form shown on &#8220;Sorry, you don&#8217;t have access to this content. Please [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12,3,16,27,20,58,31,54,65,43,33,26],"tags":[],"_links":{"self":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/1798"}],"collection":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/comments?post=1798"}],"version-history":[{"count":13,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/1798\/revisions"}],"predecessor-version":[{"id":4901,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/posts\/1798\/revisions\/4901"}],"wp:attachment":[{"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/media?parent=1798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/categories?post=1798"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/digitalaccesspass.com\/doc\/wp-json\/wp\/v2\/tags?post=1798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}