[support] Login Destination
A-NO-NE Music
madflute at anonemusic.com
Mon Sep 14 04:34:32 UTC 2009
Thank you so much.
I forgot to tell you English is not the only problem I have. I have
been wanting to learn PHP but haven't gotten that far yet. I am just
a musician :-(
I tried your suggestion, which brings user to their profile page
instead. I then tried with array pop method which returned an error
message:
"warning: urldecode() expects parameter 1 to be string, array given in mysite.com/includes/common.inc
on line 308."
According to googling, og_groups seems to be the correct property,
however.
--
- Hiro
Hiroaki Honshuku, A-NO-NE Music, Greater Boston
http://a-no-ne.com http://anonemusic.com
On 2009/09/13, at 20:54, William Smith wrote:
> Ah, I see. Ok, well the groups that a user is joined to is
> contained within the user object. So if you can feed Login
> Destination PHP code snippets, you would want something like
>
> global $user;
> if (isset($user->og_groups)) {
> return $user->og_groups[0];
> }
>
> A couple of caveats:
> - you'll need to double check the actual name of the og_groups
> property. I *think* off the top of my head it is 'og_groups', but
> I'm not 100% sure.
> - this assumes that Login Destination runs its code after the global
> $user object has been set
> - organic groups often uses the group id (gid) as its array keys, so
> og_groups[0] might not work. Since you know in advance that a user
> can only be a member of one group on your site, you could also use
> "return array_pop($user->og_groups);"
>
> Please let me know if that works. If not, I'll gladly help to tweak
> it.
>
> On Sun, Sep 13, 2009 at 8:07 PM, A-NO-NE Music <madflute at anonemusic.com
> > wrote:
>
> Thank you for your response.
>
> Not og/my. It's the group home page you created when you add a new
> group as a Content Type. In other words, there is only one node to
> that group, which content type is OG, and this node becomes the home
> page where all the private node will be added there by "Promote to
> Front". og/my only shows the title in a table view, and it doesn't
> look good as the home page to the group. I understand it is this
> way since one might belong to multiple groups in a usual Drupal use,
> but for my needs one only can join one group. This is why I want to
> show the group home page contents when one logged in.
>
> Sorry English is not my forte :-)
> --
> - Hiro
>
> On 2009/09/13, at 14:36, William Smith wrote:
>
>> Which page do you mean by "OG home page"? og/my?
>>
>> On Sat, Sep 12, 2009 at 3:24 PM, A-NO-NE Music <madflute at anonemusic.com
>> > wrote:
>>
>> Drupal 6.13
>>
>> How can I make it so OG member is sent to their OG home page using
>> Login Destination? I am assuming you need to put some PHP code,
>> but google doesn't return much help especially on Drupal 6.
>> Appreciate any help.
>>
>>
>> --
>> - Hiro
More information about the support
mailing list