Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Showing Member details Front End


Reply


529 Views

Avatar
Mrfixer

Community Member, 49 Posts

27 July 2011 at 10:02pm

Edited: 28/07/2011 12:28am

Using SSbits tutorial on Login redirection and Group Decorating i want / need to implement a system un der Admin CMS >> Security where i can have admin add members to a specific group, in this case the group being "Clients" so that they can login to a client area at the front end and see the status of their own project as updated by the Admin in SS Security page.

i have added extra fields by using a class (Called it Clients) that admin can update via the securty / Groups page in CMS and extended the Members via mysite/_config.php

_config.php
//Decorate/extend the member class
Object::add_extension('Member', 'Clients');

Class ClientDetails.php

<?php
class Clients extends DataObjectDecorator{
function extraStatics(){
return array(
'db' => array(
'PostalAddress' => 'Varchar(255)',
'TelephoneDetails' => 'Varchar(255)',
'EmailDetails' => 'Varchar(255)',
'PackageType' => 'Varchar(255)',
'PackageDetails' => 'HTMLText',
'HeardFrom' => "Enum('Verbal Recommendation,Email Campaign,Newspaper Advertisement,Website link,Search Engine,Other','Verbal Recommendation')",
'Status' => "Enum('Active,Disabled','Disabled')",
),
'defaults' => array(
'Status' => 'Disabled'
)
);
}
}

now what im trying to do is to get these to echo out onto a secure page at front end, basically client logs in and sees the status of their project that the Admin is working on.

How can i eco these out at front end so that only the client sees his own status and not anybody elses after logging in..?

regards

UPDATE: has anyone noticed its far easier to search google for an answer regarding SS than it is to use the search function here ;0).. anyway i believe this thread http://silverstripe.org/archive/show/3734 covers everything that i will need to know about getting that info to show at front end..

regards