Get support from Xavier Media
It is currently Sun Dec 08, 2013 8:02 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: user group direction
PostPosted: Wed Nov 16, 2005 1:34 am 
Offline
Rookie
Rookie
User avatar

Joined: Thu Jul 14, 2005 12:59 am
Posts: 44
Location: los angeles / san francisco
Points: 0
i thought it was possible with this program that upon login, the user would be directed to a specific page. however, i am having difficulty making this happen. for example, upon login, if user bob is in accounting, it would take bob to the page of the site that is specific to that department, etc.

did i misunderstand the parameters of the program or is there a way to direct like this?

thanks.

_________________
dig the sounds of the greatest singer that you haven't heard of yet, cory phillips. i promise you'll thank me for turning you on to it first.


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: and, perhaps i should add more detail
PostPosted: Wed Nov 16, 2005 3:43 pm 
Offline
Rookie
Rookie
User avatar

Joined: Thu Jul 14, 2005 12:59 am
Posts: 44
Location: los angeles / san francisco
Points: 0
if what i ask in the top thread is not possible, may i insert a login prompt on any page i wish, or is there only a default login page?

i like the groups function, but it is going to prove difficult for my application if there is no workaround. for instance, say i have a site that needs different levels of access to entire groups of pages or even subdomains, but i don't want to wait until they try to get there to give them a default login screen.

my scenario: preferrably, on the homepage, i would like there to be a login page whereby, someone enters in their username and their group is recognized and they are sent automatically to the group of pages relevant to them with full access rights.

now, i may wish to have each group of pages be different subdomains. will the mysql database of groups work across different subdomains relative to the root domain? if not, would i not worry about setting up multiple groups (except for admin and user) but instead create different mysql databases for each subdomain? this seems like a royal pain.

please tell me that there is an easier route. please tell me that i can direct each group to different pages upon their login from a main page. please tell me that the cookies would work across subdomains. there's got to be a way.

thanks for your help, bylla or anyone else with experience in this jungle.

_________________
dig the sounds of the greatest singer that you haven't heard of yet, cory phillips. i promise you'll thank me for turning you on to it first.


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Wed Nov 16, 2005 4:58 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Lets see if I can answer your questions.

It's not possible to "redirect" a user to a specific page after successfull login, but you can do something similar as the people asking for unique pages for each user. Read more about that at the following posts:
http://www.xavierforum.com/viewtopic.php?t=4044
http://www.xavierforum.com/archive/7_1519.php

You can get the users group id like this:
Code:
<? echo mysql_result($user_info,0,"ugroup"); ?>
The above code can be used on any protected page you like and it's not the group name you get, it's the group id (like 5660GK).

Using the topics and the above code you get something like this:
Code:
<?
$group = mysql_result($user_info,0,"ugroup");
if (file_exists("someplacehidden11838393/$group.php"))
    include("someplacehidden11838393/$group.php");
else
    echo "No group file found!";
?>
Call the above code members.php or something like that and ask all members to login at that page.

You can of course also setup diffrent pages for each group like "accounting.php", "marketing.php", etc and ask the users to login directly at the diffrent pages. I think I read something that you didn't want it like that.

When you're talking about subdomains do you mean actual subdomains like demo1.sampleaddress.com and demo2.sampleaddress.com? Because then you should only change the cookie domain to .sampleaddress.com instead of sampleaddress.com. Then the users will be able to login at demo1.sampleaddress and visit pages at demo2.sampleaddress.com without login in again (if they have rights to access the pages on demo2.sampleaddress.com that is).


Report this post
Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Registered users: xlreariasd


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]