Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

Re: Redirect user to group page upon login

$
0
0

Okay so I have spent a little bit of time trying to migrate the code to work with SS3,

I have added new row to the DB before with no hassles, but this time is doesn't seem to be working,

I think where I have gone wrong is "DataExtension", the last time I used private static, the class extended the page template "page.php", where as now it extends DataExtension and I have no idea what that is

<?php
class GroupDecorator extends DataExtension {

private static $db = array(
'GoToAdmin' => 'Boolean',
'LinkedPage' => 'SiteTree'

);

}

The original code for SS 2.3 looked like this:

class GroupDecorator extends DataObjectDecorator {

public function extraStatics(){

return array(
'db' => array(
"GoToAdmin" => "Boolean"
),
'has_one' => array(
"LinkedPage" => "SiteTree"
),
);
}
}

PS: Anyone helping out with this I would like to create a new / update the old guide for a custom login form with group based redirection to help others looking for this solution also.


Posted to: Redirect user to group page upon login | Show Thread | Post Reply


Viewing all articles
Browse latest Browse all 4235

Trending Articles