ok, I think I did not understand your problem properly, as you said “I would like to use Expression Engine’s member system as a single system for my entire site”.
I thought they would always use the ee login.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 29, 2009 11:52am
Subscribe [5]#16 / Mar 29, 2009 7:01pm
ok, I think I did not understand your problem properly, as you said “I would like to use Expression Engine’s member system as a single system for my entire site”.
I thought they would always use the ee login.
#17 / Mar 29, 2009 7:13pm
They will be using the ee user system to login, logout, and register; however, other than a link on the other part of the site that will send them to ee to do such, I only need to be able to determine if they are or would be considered by ee to be logged in.
Initially, I had hoped that I could invoke ee or a portion there of, without the template parser class to get the required information. That apparently is impossible. So then I moved to checking ee’s cookies. However, I can not see how the userhash or uniqueid relate to a user id. If I could make that leap to how ee generates that information in one direction or the other… ie. userid -> userhash or uniqueid or userhash or uniqueid -> userid then I would have all the information I need to accomplish my task.
I have been reading through ee core…. all day and just can’t find where this is done. Apparently only professional programmers can do this.
#18 / Mar 29, 2009 7:28pm
And then there was the AHA moment!
cookie exp_userhash = exp_members.password in database
cookie exp_uniqueid = exp_members.unique_id in database
Now that I can pick up a set of unexpired cookies, then query the db obtain the username and userid and therefore do what I need with the other program.
I do not believe this will be any less secure than ee’s reliance on these same cookies to determine logged in status. Correct me if I’m wrong.
#19 / Mar 29, 2009 7:39pm
Apparently only professional programmers can do this.
I suspect that unprofessional programmers could also do what you request. The common denominator being “programmer,” of course. What you’re requesting does not seem to be easily accomplished without some programming, and does not seem to be a feature or request in great demand. As an example, is this capability you seek available elsewhere in other applications?
#20 / Mar 29, 2009 7:54pm
As an example, is this capability you seek available elsewhere in other applications?
Actually Ronnie, it is. See Simple Machine Forum’s SSI.php. It’s called bridging. And among the users of the genealogy software I’m using is a very sought after thing…. So much so, that the developer inserted hooks in his program to allow you to integrate with cms’s. The only information required is to figure out how that cms validates its users. Although, to my knowledge it has only been accomplished using opensource software, I’m about to change that.
I have had a long standing respect for anything that comes from Rick Ellis and wished to utilize his much more secure, supported, stable, and documented software.
After all, programming ain’t rocket science… nothing blows up when you screw up a program. It’s just a language one has to master. I’m working at it and am a quick study.
#21 / Mar 29, 2009 10:11pm
The ExpressionEngine community is much heavier with designers and site owners such as yourself than code monkey’s. The appeal of EE is that it can do most or all of the things a typical site needs right out of the box (it will never be able to do everything.) A user of EE needs no knowledge of PHP/MySQL.
Getting frustrated in this thread would be like walking into a butcher shop and getting frustrated because nobody knows how to perform knee surgery (they could tell you how to chop off your leg, but they don’t have the exact knowledge to correctly answer your question.) The likely reason you aren’t getting your answer is because nobody posting in this thread knows any better than you do on how to do this (or not without putting in a number of hours for research as you have.) Even many of the stronger EE add-on developers here likely spend more time with design/management than they do with PHP/MySQL.
CodeIgniter works very similar to the way EE does. If you were to ask these same questions in the CI forums, you would likely get much more spot on responses. The reason is that the CI community is heavily populated with people who dedicate more of their time to the programming side of development. So your lack of good responses partly has to do with the nature of the community here.
The reason you can’t reach into EE and only use certain elements is because everything flows through the index.php file. EE is a script, it starts from the top and works it’s way from there. Again, CI is different but if you want to get an idea of what I’m talking about, take a look at the CI flowchart. You can access EE libraries by including files in your own applications but unless EE was designed to allow what you are trying to do then what you are asking is unlikely to be so simple that it won’t require some sort of PHP/MySQL wrangling.
As for sessions, I haven’t looked closely, but EE does more than check the cookies. It also has session information in the database which checks things like IP address, timestamps, checks to ensure the cookie matches the session in the database, etc.
I can’t tell you how to do what you are looking for because I don’t know without putting in time I don’t have for research. You might check into Amember which is designed to be a “bolt-on” membership system. I don’t know if it will work for your purposes though.