textfile LoginHandler

Author Message

Sonia Sanchez

Monday 19 January 2009 10:28:56 am

Hi, I want to login using textfile handler, but I have some problems.

At first, I put the next lines inside the override/site.ini.append.php in to the [UserSettings] section.

LoginHandler[]=standard
LoginHandler[]=textfile

Next I generate a new override for config file override/textfile.ini.append.php with this values:

[TextFileSettings]
TextFileEnabled=true
FileName=users.txt
FilePath=root
FileFieldSeparator=;
DefaultUserGroupType=id
DefaultUserGroup=12
LoginAttribute=1
PasswordAttribute=3
FirstNameAttribute=4
LastNameAttribute=5
EmailAttribute=2

My /users.txt contains this line:

test;email@mydomain.com;test;Test;Test

And finally, I clean the caches and refresh the page.

Now, If I login with user from eZ, all goes ok. Then, if I login with an user that doesn't exist, eZ says me that, but if I login with the textfile user, eZ returns me this error:

Fatal error: eZ Publish did not finish its request
The execution of eZ Publish was abruptly ended, the debug output is present below.

In debug there are not any error...
Anyone knows what happens?

Thank you! :)

André R.

Monday 19 January 2009 12:10:03 pm

If this is locally or developer server / setup: Enable error output for php in it's php.ini file.
Then you'll probably get some more useful debug output.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Carlos Revillo

Monday 19 January 2009 12:51:08 pm

Hi. I've just tried to reproduce your situation, because in a few days we'll need to work with text files for login :)

I've done what Andre said and got this error.

Fatal error: Using $this when not in object context in /var/www/ez1/kernel/classes/datatypes/ezuser/eztextfileuser.php on line 252

After you fix this, you'lll get same error at line 291.

What have worked for me is to change line 252 from

$existUser = $this->fetchByName( $login );

to

$existUser = ezUser::fetchByName( $login );

and line 291 from

$user = $this->create( $userID );

to

$user = eZUser::create( $userID );

I'm working with the trunk version of this file, so, is this maybe a bug?

Hope it helps.

Kristof Coomans

Monday 19 January 2009 11:13:43 pm

http://issues.ez.no/14270

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Sonia Sanchez

Tuesday 20 January 2009 12:50:18 am

Thank you! The bug is solved and all goes ok! ;)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 18:26:53
Script start
Timing: Jan 18 2025 18:26:53
Module start 'layout'
Timing: Jan 18 2025 18:26:53
Module start 'content'
Timing: Jan 18 2025 18:26:54
Module end 'content'
Timing: Jan 18 2025 18:26:54
Script end

Main resources:

Total runtime0.6710 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 587.8047152.6094
Module start 'layout' 0.00460.0026 740.414139.4141
Module start 'content' 0.00720.6623 779.8281654.2969
Module end 'content' 0.66950.0016 1,434.125016.1875
Script end 0.6710  1,450.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4739160.0002
Check MTime0.00130.1982160.0001
Mysql Total
Database connection0.00070.097210.0007
Mysqli_queries0.599689.3564670.0089
Looping result0.00060.0922650.0000
Template Total0.641595.620.3207
Template load0.00220.335120.0011
Template processing0.639295.252320.3196
Template load and register function0.00010.016110.0001
states
state_id_array0.00080.113710.0008
state_identifier_array0.00190.282520.0009
Override
Cache load0.00190.2885420.0000
Sytem overhead
Fetch class attribute can translate value0.00050.081240.0001
Fetch class attribute name0.00140.216180.0002
XML
Image XML parsing0.00320.469740.0008
class_abstraction
Instantiating content class attribute0.00000.002890.0000
General
dbfile0.00250.3768290.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs