Search

@NickToye here’s the commit detail on my GitHub fork of the Front End Authentication extension: http://github.com/neilalbrock/frontend_authentication/commit/1ba0479d83114e8577c69840f0d695338317d822

This block builds the output XML, it takes an array. You should be able to add anything else you require to this array and have it be available in the XML.

$context['xml']->appendChild(new XMLElement('front-end-authentication', NULL, array('username' => (FRONT_END_AUTHENTICATION_SUCCESSFUL == true ? $username : ''),'status' => (FRONT_END_AUTHENTICATION_SUCCESSFUL == true ? 'authenticated' : 'invalid'))));

That’s great thanks.

I have a question about this. I have this registration form that works great, the login works great. However, I may want to prevent someone from logging in until they have been approved.

So I have created a checkbox in my section for Members, and I basically only want them to be able to login if this checkbox is checked.

What is the best way to go about doing that?

I need to go for a toilet.

Thank for you help

Anyone else got any serious comments to make?

What is the best way to go about doing that?

To jump into the code. I’m not going to tell you where to look, because you should be able to find it easily as it’s a single-file script. Where the username and password are looked up in the database, you will need to modify the query to also check that your checkbox has a yes value.

Nick, that is just what I want. That push to development, it’s important.

Thanks mate, I appreciate it.

Going to stick my head in the sand now and see what I can find. :)

Regarding the redirect to login here:

if(!$bOnLoginPage && is_array($types) && in_array($context['parent']->Configuration->get('page-type', 'frontend-authentication'), $types))
            $context['page_data'] = $context['page']->resolvePage(trim($context['parent']->Configuration->get('login-page', 'frontend-authentication'), '/'));

Shouldn’t this actually just return a forbidden code with a redirect header to the login page? Otherwise publicly linked protected pages will get indexed as the login form.

Seems simple, but I’m still cutting my teeth on pulling out that sort of data (I just need to know how to pull out the login page URL).

I’ve got two quick questions.

Is this based on custom member sections or the standard author roles in symphony?

And will it fly with Symphony 2.0.4?

Both of them are ‘yes’ I think, not sure. But I’m asking anyway ;)

NickToye, did you solve the issue with the wrong redirect and missing event data?

I’m running into the same problem and can’t find a clear fix in this thread.. (if any)

Ok, it seems you get those issues only if you try logging in straight from the login pages, as supposed to going to a protected page first which auto-directs you to the login page. Then it will work.

Not ideal though, the only to make a straight link to the login page, would be a dummy protected page

This extension doesn’t have any way for you to tell who it is that is logged in. I tried adding this into the extension myself by adding the line $context['params']['authenticated-user'] = $username so I could do some filtering but this doesn’t show up under the ?debug parameters. What does one have to do to add a parameter?

@hoopy I’ve found the members extension to be a good fit for tracking members and permissions.

The members extension is something I’ve looked at and is a bit too… invasive(?) of what I am attempting to do.

If I could just tell the name of the user who was logged in then frontend_authentication would suite me perfectly.

Well, I got it to work. Didn’t know you could only have one callback per delegate.

Didn’t know you could only have one callback per delegate

One callback per delegate per extension. Multiple extensions can subscribe to the same delegates though.

I think there is no reason to subscribe to the same delegate in the same extension. You can do something like:

function delegate_callback($params){
    $this->doFunctionA();
    $this->doFunctionB();
}

has anyone tried this with 2.0.8 rc or is it pretty much dead in the water?

After login it should go to user profile page , how to achieve this ?

the profile page is a inner page , it is not shown in the front end before the user logs in,only the authenticated user can view that page, how to redirect to that page ! Can any one help me

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details