Client specific area

Permalink 2 users found helpful
Hi all

Looking at the various posts I don't think this is possible but thought I would ask the question...

We are in the middle of building our new site and want to include a client area.

We would love for our client to go to a general login page and once they have entered their details it takes them to a specific page so they can view proofs and client specific info.

Is this possible?

If not would any of these workarounds, work?...

1. Edit the user profile html
If we enabled the setting to have users redirect to their profile page after login can we edit this page so that we can add editable blocks, forms and file downloads for the client to see? So in essence creating a client page?

I take it only that user will see the profile page or is this public?

2. Create a client specific login block (would rather not do this)
Another method may be to create a page that the client goes to which displays a login block. We would edit this block to re-direct to a specific page.

The only thing about this is we would need to create a new login block for 30+ clients and seems a long workaround.

3. Group specific re-direct
We would love to have an option to set a re-direct to a specific group. Is this possible?

I hope one of these would work or is being added to the next version of Concrete.

Look forward to your responses.

Chris

senshidigital
 
jelthure replied on at Permalink Reply
jelthure
yes to option 1, but these profiles would be accessible to all so you would need to edit the profile page controller to only allow the logged in user to see their own profile page.
senshidigital replied on at Permalink Reply
senshidigital
Thanks fro the reply, much appreciated.

How and what would I change in the page controller?
jelthure replied on at Permalink Reply
jelthure
copy: /concrete/controllers/profile/controller.php

to: /controllers/profile/controller.php

then copy: /concrete/single_pages/profile/view.php

to: /single_pages/profile/view.php

then one method would be to edit the view function in /controllers/profile/controller.php to not load a profile if a user id is passed that way preventing users from viewing other profiles by changing the url.
senshidigital replied on at Permalink Reply
senshidigital
Thanks again.

Not sure if I have picked you up correctly. If I prevent users from viewing there profile when they login (passed) is that not the opposite to what I want? I want a client to view there profile as soon as they login with no edit bar and not see other users.

For example I would take off the search members code etc.
jelthure replied on at Permalink Reply
jelthure
try this, change your view function to:

public function view() {
      if(!ENABLE_USER_PROFILES) {
         header("HTTP/1.0 404 Not Found");
         $this->render("/page_not_found");
      }
      $html = Loader::helper('html');
      $canEdit = false;
      $u = new User();
      if ($u->isRegistered()) {
         $profile = UserInfo::getByID($u->getUserID());
         $canEdit = true;
      } else {
         $this->set('intro_msg', t('You must sign in order to access this page!'));
         Loader::controller('/login');
         $this->render('/login');


this will prevent users from trying to access profiles by passing the userid arg in the url likehttp://www.yoursite.com/profile/-/10... and should only show them their own profile. now as long as your users are not given administrator rights they will not see the edit bar.
senshidigital replied on at Permalink Reply
senshidigital
Thanks I will give this a go.

I will let you know how I get on.

Your a star!
mario replied on at Permalink Reply
mario
hi chris,

The other thing you can do is to implement this using Advanced Permissions.

For example:

Steps

-Enable Advanced Permissions in your site.php file under the config directory.

define('PERMISSIONS_MODEL', 'advanced');


-Create a Group called Clients

-Create some non-admin users and put them in the Clients group

-Create a specific page called Client Login

-When you're adding the Login block specify that you want people to stay on that page after login

edit: here's the link
http://www.concrete5.org/marketplace/addons/login_block/...

-Add a Content block with an explanation and/or the info you want users to see after they log in. You might include a link to the Actual Clients page here.

-Change the Permissions (click the block after you add it) so that only Admins and your Clients and/or Client User(s) can view/edit/delete it. Remove the Public's Permissions to view that block section.

-Make sure that your actual Client page(s) is hidden away from the General Public as well by playing with the Permissions/Page Properties using the Dashboard Sitemap (add checkboxes for exlude from Nav, Sitemap, pagelist, etc. if appropriate)

-once they're at the clients page you can even use permission to only show block or pages under the page to filter out Clients from one another.

I've put together some video tutorials on Permissions under the Documentation section on the Forum if you need clarification. The C5 team has also revised their Help Docs too.

I hope that helps. :)

EDIT: There's also a nice mod to the login block that will acknowledge who's logged in after they've done so.

Keep in mind too that users can belong to more than one group. so, johndoe could belong to the Clients group as well as ABC corp group but not XYZ widgets group. After he logs in he only sees pages listed associated with both the clients group and ABC group but not XYZ if you only let people that are members of the XYZ group see their pages.
mario replied on at Permalink Reply 1 Attachment
mario
Custom Template attached for login block after you have the login block installed and applied. unzip and upload it to your blocks directory in the root (not the one in the concrete directory)

then go to the login block on the client login page and choose Custom Template and apply the template.
senshidigital replied on at Permalink Reply
senshidigital
Thanks for these. I will try all options and see which one works out best.

Will keep you informed.

Cheers!
senshidigital replied on at Permalink Reply
senshidigital
Hi Guys

I tried the first method which did not work. Just came up saying 'problem finding page'.

Mario, your method is the way to go I think. I am going to create a new thread with how I will do the client area. I may even do a screen cast at some point.

Thanks for the help guys!
senshidigital replied on at Permalink Reply
senshidigital
mario replied on at Permalink Reply
mario
Looks good! It'll help people understand this topic. This general technique can be applied to creating departmental specific pages as well.