Page 1 of 2

FE Login Problems

Posted: Fri 23. Jan 2009, 03:57
by rosemckay
I'm working on a Mac, I have mySQL and PHP 5 running on my desktop computer (installed via MAMP). The version of phpWCMS that is running is 1.3.9, the install went smoothly and everything functions fine in the back end. The problem I'm having is with the Front End Login Content Part. I've a test user that is frontend enabled only so I can test the site with some of the "hidden" structure. I can't even make sure that the hidden areas are going to show up when they are because I can't log in at all. Not with my admin account or the test account. I can login to the backend with my admin account but not on the front end.

When I try in the frontend login it seems to load something and then brings things back to the original log in form. Also nothing changes as far as the hidden structure it's still hidden. And when I click "register" the page says:

Register account
{FE_USER_REGISTER}

But no fields to register with.

Can someone please help me diagnose and fix this? Thank you.

Re: FE Login Problems

Posted: Fri 23. Jan 2009, 04:06
by rosemckay
Wow I just stumbled upon this code on line 74 of the config file

Code: Select all

$phpwcms['SESSION_FEinit']    = 0; // set 1 to enable sessions in frontend, 0 to disable sessions in frontend 
I changed that 0 to 1 and now it seems to work.


I still need some help with the register problem.

Re: FE Login Problems

Posted: Fri 23. Jan 2009, 08:41
by hausmeister
as far as i know the register-funtion isn't working.

hausmeister

Re: FE Login Problems

Posted: Fri 23. Jan 2009, 11:03
by flip-flop
Copy
/template/inc_script/frontend_render/disabled/fe_user.php
to
/template/inc_script/frontend_render/fe_user.php
and have a look into.

Knut

Re: FE Login Problems

Posted: Fri 23. Jan 2009, 19:12
by rosemckay
Fantastic that copy/paste worked! BUT it's in German :? . Any chance this might be in English too?

Also I tried filling in the form and submitting the registration. It seemed to work, there is an entry in the database. There is nothing in the back-end to approve or deny the user or even see that they are registered. Is there another secret to make this function?

Re: FE Login Problems

Posted: Sun 25. Jan 2009, 05:43
by rosemckay
I found the felogin.ini.php, it seems to be commented pretty well however I don't seem to be able to find any documentation so that I can get definitions for some of the terms used in the instructions. For example what is level depth and how do I use it? Is 0 an admin and 10 a basic user or vice versa? What is the parent's level? Do these levels mean that I can set different areas of my site to be visible only to users of specific levels? The docu site has no info. Please any help is appreciated!

Re: FE Login Problems

Posted: Fri 30. Jan 2009, 05:03
by rosemckay
bump

Re: FE Login Problems

Posted: Fri 30. Jan 2009, 16:59
by flip-flop
At this rime we have two different login practices:
1. The internally frontend login (using the cp "frontend login")
2. The externally Frontend Login workaround {FELOGIN}

===== FELOGIN: Temp. Frontend Login =====

Download und Posting: [[http://forum.phpwcms.org/viewtopic.php? ... |Temporary Frontend Login workaround]]

Files:

Code: Select all

|                path                  ^ file                 ^ descpription       ^
^ /template/inc_Script/felogin/        | README.txt           | Doc                |
^ /template/inc_Script/felogin/        | felogin.ini.php      | Main proc.         |
^ /template/inc_Script/felogin/        | felogin.logout.html  |                    |
^ /template/inc_Script/felogin/        | felogin.login.html   |                    |
^ /template/inc_Script/fronend_init/   | felogin.init.php     | Main proc.         |
^ /template/inc_Script/fronend_render/ | felogin.render.php   | Main proc.         |
> For sure I know you are waiting for the new release since long time including long-awaited permissions and so on.
>
> And yes, I am working on it and as I told flip-flop yesterday: I need it myself for coming projects.
>
> But I also know that there are many of you waiting for a fast and simple simple solution to limit access to special sections of your site, e.g. login area for customers or other user groups.
> I have no backend-ready thing for you right now but here is a very generic | frontend_init/frontend_render script package.
>
> Try it, I have it tested in current development release only but it should work in 1.3.3 too. Documentation is included.
>
> Oliver

This **FELOGIN** behaves like a hood, it becomes from the outside putting over that entire process. //(since version ~1.2.5).
There is no connection to the internal users and all the associated functions.
Users, there keywords and the the protecting levels are administered in an external file.
The backenend settings of "frontend menu status" are not used here.
I isnĀ“t possible to register a User in backend from outside.


=== Condition -> conf.inc.php: ===

Code: Select all

$phpwcms['allow_ext_init']   = 1; //allow including of custom external scripts at frontend initializ.
$phpwcms['allow_ext_render'] = 1; //allow including of custom external scripts at frontend rendering

$phpwcms['allow_cntPHP_rt']  = 1; //allow PHP replacement tags and includes in content parts

$phpwcms['SESSION_FEinit']   = 1; // set 1 to enable sessions in frontend, 0 to disable sessions in frontend
=== Copy the files: ===

Code: Select all

- /template/inc_script/froentend_render/disabled/felogin.render.php -> /template/inc_script/froentend_render/felogin.render.php
- /template/inc_script/froentend_init/disabled/felogin.init.php     -> /template/inc_script/froentend_init/felogin.init.php
=== Starting position: ===

Code: Select all

.L  E  V  E  L
-:  :  :  :  :  :
-0  1  2  3  4  5  <- LEVEL-No.)
-:  :  :  :  :  :
-+ root   :  :  :                        ID=0
-+--+ en  :  :  :                        ID=01
-+--+--+ category_01                     ID=02
-+--+--+ category_02                     ID=03  -> parent category (Loginbase)
-+--+--+--+ category_02_01               ID=05  {FELOGIN} (Login)
-+--+--+--+--+ category_02_01_01         ID=07  -> access blocked
-+--+--+--+--+ category_02_01_02         ID=08  -> access blocked
-+--+--+--+ category_02_02               ID=06  {FELOGIN} (Login)
-+--+--+--+--+ category_02_02_01         ID=11  -> access blocked
-+--+--+--+--+ category_02_02_02         ID=12  -> access blocked
-+--+--+--+--+--+ category_02_02_02_01   ID=13  -> access blocked
-+--+--+--+ category_02_03               ID=09  {FELOGIN} (Login)
-+--+--+--+--+ category_02_03_01         ID=14  -> access blocked
-+--+--+--+--+ category_02_03_02         ID=15  -> access blocked
-+--+--+ category_03                     ID=04
-+--+--+ category_04                     ID=10
-:  :  :  :  :  :
-0  1  2  3  4  5  <- LEVEL No.
=== Blocked shall/may: ===

Code: Select all

-+--+--+--+--+ category_02_01_01         ID=07
-+--+--+--+--+ category_02_01_02         ID=08

-+--+--+--+--+ category_02_02_01         ID=11
-+--+--+--+--+ category_02_02_02         ID=12
-+--+--+--+--+--+ category_02_02_02_01   ID=13

-+--+--+--+--+ category_02_03_01         ID=14
-+--+--+--+--+ category_02_03_02         ID=15
The login {FELOGIN} is based in:

Code: Select all

-+--+--+--+ category_02_01               ID=05  {FELOGIN}
-+--+--+--+ category_02_02               ID=06  {FELOGIN}
-+--+--+--+ category_02_03               ID=09  {FELOGIN}
The parent level of the login site(s), called "login base" are

Code: Select all

-+--+--+ category_02                     ID=03
**FELOGIN_LEVEL_DEPTH** refers to the login basis, thus the category in **FELOGIN_LEVEL_ID**. The level counting begins at **home=0** (root) :!:

== felogin.ini.php ==
;The parent category login basis of the login level is (category_02)
FELOGIN_LEVEL_ID = 3

;thus is the level depth to indicate also (category_02 = Level 2)
FELOGIN_LEVEL_DEPTH = 2
; -----------------------------------------
; Put in the level depth, root level = 0
; FELOGIN_LEVEL_DEPTH = 2
FELOGIN_LEVEL_DEPTH = 2

; This is the ID of parent's level, root would be 0
; FELOGIN_LEVEL_ID = 3
FELOGIN_LEVEL_ID = 3
; -----------------------------------------

;[Ebene]
;Name = Passwort
;----------------
[5]
hansi = hansi123
toni = toni123

[6]
waldi = waldi123
oki = oki123
andi = andi123

[9]
mini = mini123
moni = momi123
;----------------
Under the **parent login base** we find the **login categories** and below them the **hidden categories**.
All login categories must be placed in the same level.

No multiaccess from one users to several hidden categories available (e.g. the same user at [5] and [9]), unless this user is created for this categories.
However, changing a complete category thread, a login is generated into the new category. The old category is unloged automatically.

Knut

Re: FE Login Problems

Posted: Tue 3. Feb 2009, 05:49
by rosemckay
So am I understanding correctly that each user is listed under the level number they are to have access to in the felogin.ini.php file? And the level number corresponds to the category ID number? What if the user has registered themself? How do I know their password in order to add them to the list?

Re: FE Login Problems

Posted: Thu 12. Nov 2009, 23:08
by DusX
Sorry, I'm a little out of date.. I have an older site that my client is now asking for this type of functionality.
The site is version 1.2.1, so I know I need to update...
But can any of you tell me if this functionality is built into the current v1.4.2?

thanks for the help

Re: FE Login Problems

Posted: Fri 13. Nov 2009, 00:40
by flip-flop

Re: FE Login Problems

Posted: Fri 8. Apr 2011, 23:45
by achilehero
Hi!

I've been reading about the {FELOGIN} workaround, but canot seem to make it work. I guess I don't understand the FELOGIN_LEVEL_DEPTH and the FELOGIN_LEVEL_ID properly.

I have attached my structure: Image

I need to make Truck dealers (category ID:24) a section that would contain data accessible by user/password with at least two different subsections (MAN - ID:25 and Volvo - ID:26). Every {FELOGIN} would go in the articles in each of these categories (as "Autentificare MAN" and "Autentificare Volvo"). Please help me by telling what values should FELOGIN_LEVEL_DEPTH and FELOGIN_LEVEL_ID have. I tried combinations, but couldn't figure it out. What is it that I'm doing wrong, so that {FELOGIN} doesn't render. (I've made all the changes in config.inc.php and copied the frontend_render and _init files)



Thanks a lot,
Cristian

Re: FE Login Problems

Posted: Fri 8. Apr 2011, 23:56
by achilehero
I guess I figured it out just after the post. I didn't specify the username/password category numbers. That's why it didn't work.

So , for others that may have the same problem as me, FELOGIN_LEVEL_DEPTH = 1 and FELOGIN_LEVEL_ID = 24, and user/pass groups defined for [25] and [26]


BUT STILL ... I can login, but when I am trying to access a level underneath the one that I logged in (e.g.: I logged in 25 and try to access 27) it doesn't access it and it redirects me back at 25 for login. Why is that?

Thank you!

Re: FE Login Problems

Posted: Sat 9. Apr 2011, 00:51
by flip-flop
Please have a look: FELOGIN: Temp. Frontend Login

Knut

Re: FE Login Problems

Posted: Sat 9. Apr 2011, 10:39
by achilehero
Yes, Knut. That's where I looked to make everything work (by the way, thanks for maintaining that website updated with the evolution of phpwcms) but it doesn't work.

I just have some questions, then ... when I make the logon, after the user is authenticated (e.g.: at level 25), does it mean it can access everything below that level (e.g.: levels 27 and 28) or I should define permissions for each and every level separately (e.g. 25 and 27 and 28 individually ) ...

Or is it that these permissions are available just for one single level below the {FELOGIN} level?



Maybe you should update the explanations with these updates, to be more specific. It took me a day or so to read, try, read again, try again to figure these little "not-so-obvious" tips.


Thanks!