Weird quirk with Mambo/Amember integration

Discussion in 'Integration' started by Frustrated, May 12, 2005.

  1. Frustrated

    Frustrated Guest

    Hi All

    I'm using the Amember login mod in mambo instead of the mambo one and it works perfectly for the most part. Except there is just one page in mambo that's available to registered users and even when I'm logged in I can't see it (tells me I'm not authorised) then it logs me out and I can't log back in again.

    When I try the screen just refreshes and I'm still logged out. Can't figure out if the problem is with mambo or amember. I have to close the browser window and open a new one then I can log in again. Anyone had this trouble??

    Claire
  2. lthompson4

    lthompson4 Guest

    Not sure if this helps...

    I am trying to figure this all out myself, but Alex told me I should use the Mambo log-in and NOT aMembers, so I'm wondering if that could be what's causing you trouble, or if I have misinformation.

    Maybe you can answer a question I have. I want some of my aMember products to give access to the pages in Mambo that I've marked as restricted and other products to not give access. How do I set that up in aMember?

    Thanks,
    Lisa
  3. Frustrated

    Frustrated Guest

    Yes that's it!

    Hi Lisa

    Thanks for your input otherwise I might never have gotten it! I switched from using the amember login mod to the Mambo one and now I can access that page no problems! It seems the problem must be in the aMember login mod for Mambo.

    Unfortunately it also ruins my dream of a single login....

    If a user logs into your site using Amember login then they are automatically logged into Mambo as well. I checked this by logging into the Mambo admin to see if the user was there, which it was. But it seems that Mambo doesn't quite like this solution. For 99% of my site the single login works perfectly but just for that one page (which allows registered users to add content) it doesn't.

    But if they use the Mambo login then they are NOT logged into Amember and if they want to look up their membership details they have to log in again...not what I was hoping for. :(

    Which brings up an interesting Q what is the intended use of the Amember login mod?

    Now to your Q. As you know the Mambo plugin only gives access to register your users as public, reg or special only. It doesn't allow you to automatically assign access levels. And doesn't currently support user groups, which would allow you to classify some pages as sub-a, sub-b & subscription-c. I believe this is a feature to be included in the next version. Although you might want to do a net search and see if you can find someone who's written a mod for that. Because I believe that the Mambo plugin for Amember takes it's cue from the database itself. For example the phpbb plugin reads the user groups already in my forum and then allows Amember to assign to those existing groups automatically.

    This is fine for my site because I only have two access levels, registered and not. Registered users have access to everything while the unregistered users have access to only those pages marked as public.

    Hope this helps. I have to confess I'm a Mambo veteran of only 2 weeks and am rather limited in my experience with it... :D I suppose one solution might be to split your subscriptions into subdomains and have a seperate Mambo db for each subdomain. That won't work if you plan to have common shared pages between the subs though. This would also depend on your hosting account and I'm not sure how it would affect your Amember license.

    It might be worth your while checking out the Mambo forums and see how others have solved or worked around this problem. Once you figure out how to solve it in one application it'll be easier to know how to integrate amember with it.

    Claire
  4. lthompson4

    lthompson4 Guest

    I only have two levels of website access too, public and registered (paying members), but something is not set up correctly because when I create a new product in aMember and want to specify if people who buy it have access to the registered pages or not the Mambo drop-down box is blank. I know Alex said I need to define my groups first, but how do I do that when Mambo has already defined them?

    And, I don't know how to get my members from aMember over to Mambo so they can log-in. I tried doing the "restore database" - I think that's what it was, but got an error message.

    Any suggestions?

    And by the way, it doesn't seem right that people can't access their member info by logging in once. I wonder how everyone else does it...

    Lisa
  5. lthompson4

    lthompson4 Guest

    Wait - I figured this out

    Ok, after going back and forth with Alex a few times, I have finally realized that there is a aMember Log-in Module that comes with the plug-in that has to be installed as a Module from Mambo.

    Maybe this was obvious to a lot of you, but for me, as a VERY new person to Mambo, I just didn't get this right away. So, I figured I'd follow up here for anyone who may come across these posts later with the same question.

    Once you install this module, you turn the other one off (unpublish it) and then if you've chosen which groups you want the people who buy your products to be put in via your Products page in aMember admin. . . they should be able to log-in one time on your Mambo site and be done with it!
  6. Brat

    Brat Guest

    aMember Mambo login problem is this...

    Hey all. I too have had this problem.

    Here is what could be happening.

    As it stands, aMember DOES NOT synch up the Superadministrator ID. That means that the Superadmin (which is the Mambo installer, i.e. YOU) is "nonexistent" as far as aMember is concerned.

    I have been tinkering with the amember login module to make it 100% compliant for regular members (for Mambo versions 4.5.1 and up). Thus far, it works perfectly for normal members (subscribers).

    I am still working on a solution for the Superadministrator dilemma. This is why you are told you don't exist when you try to login from Mambo's frontend.

    Now, here is what I think COULD be a solution:

    aMember's login.php file needs to be altered so that it checks to see if the person logging in is the Superadministrator.

    (I am assuming that folks are using aMember for paid sites, the only Superadministrator is typically the person who created the site. Otherwise, be careful of assigning the Superadministrator title to just anyone, as this means they would bypass the normal aMember login).

    The pseudocode would be something like this:

    Code:
    
    if ($MamboUserType != 'superadministrator')
    {
      Do normal aMember login
    }
    
    else {
      Bypass aMember and use Mambo's native login
    }
    
    As I'm still learning PHP, I don't quite have the stuff between the {} figured out yet.

    Because of how Mambo handles login, there is no way to check the user's status BEFORE going into the login routine (kinda makes sense, when you think about it). So, SOMEONE'S login routine has to do the checking, and it's far easier to alter aMember's login.php file than Mambo's.

    Right now, I'm in login.php, taking a look around. If anyone has any ideas, please post here. Thanks.
  7. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Brat,
    I'm familiar with Mambo, so I cannot say exactly.
    However, if you open some Mambo admin URL directly, will not it ask your for username/password?
  8. Brat

    Brat Guest

    No, the problem isn't backend but FRONTEND.

    Backend functionality is absolutely not a problem.

    The issue is with frontend administrative functionality.

    I can edit items from the frontend, but cannot save them. It appears to be linked to how Mambo checks user status when saving or checking in items from the front end.

    Quite simply, sometimes it is far easier to do a quickie edit from the site's frontend (where you can easily see what you want to change) than to log into the backend.

    This problem ONLY happens with the superadministrator ID, primarily because this ID is not captured in amember (and it SHOULDN'T be).

    Also, just a head's up:

    There are quite a few components and such floating around the Mambo community, particularly Community Builder and several forum options. Be careful with these, as they tamper with the login, and therefore often times circumvent amember's control of the login.
  9. SnS

    SnS New Member

    Joined:
    Sep 15, 2005
    Messages:
    1
    Amember integration with mambo

    We are just about to try and change our website accounting system. We are a UK based community wireless share club. Our new site is going to use mambo and we are waiting for a copy of amember. You talk of mambo modules for amember. Where can these be downloaded from? Ideally on our newsite www.snsfeeed.net we want to use amember to log in to accept fees and do all the autoconnect/remove users from wiana and also to be able to access a new forum. Any suggestions on modules appreciated. Our club is new and is the amalgamation of 2 existing, one using nuke and other on webApp. Advice is appreciated! :confused:

Share This Page