Search

I see ways of logging a member in after they do the activation process, but I'm not finding ways of logging them in before or without that happening.

Was trying to hack it together myself, but I think I'm missing something about calling that SymphonyMembers class. Any hints?

public function load(){
    if(isset($_POST['action']['member-new'])) return $this->__trigger();
}

protected function __trigger(){
    include(TOOLKIT . '/events/event.section.php');
    $theResult = $result->getAttribute('result');
    if ($theResult == 'success') {
        SymphonyMember::login(array('email' => $_POST['fields']['email'], 'password' => $_POST['fields']['password']), false);
    }
    return $result;
}

I must admit, I assumed I'd seen the same option and ticked it, but it isn't there.

This is because the event is a standard Section event, and not controlled by Members.

The safest way would be to correctly mimic the Members: Activate Account event

// At the top of the __trigger function
$this->driver = Symphony::ExtensionManager()->create('members');

$data_fields = array(); // Your posted data goes here
$this->driver->getMemberDriver()->login($data_fields, true);

Note I've not tested this yet...

After hours of messing with this, and not having much luck, I realized there is now an event filter called "member-login', which as soon as I attached, worked like a charm. ::sigh:: oh well.

I haven't got that in my install, and I have the latest version...?

Looks like I don't have the latest version. Sneaky Brendan.

Well spotted Jesse.

It seems that it only appears in the list of event filters when you do NOT have an activation field added to your member section.

However, once added, it does appear to work regardless of whether you have an activation field added.

Ah, ok. Yeah that's not good, as you can access an account whether activated or not, dependant on the role!

Need to fix that asap.

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