Forums / General / textfile LoginHandler

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! ;)

eZ debug

Timing: Jan 31 2025 04:19:10
Script start
Timing: Jan 31 2025 04:19:10
Module start 'content'
Timing: Jan 31 2025 04:19:10
Module end 'content'
Timing: Jan 31 2025 04:19:11
Script end

Main resources:

Total runtime0.1523 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.8203180.8516
Module start 'content' 0.00490.0061 768.671997.9297
Module end 'content' 0.01100.1411 866.6016527.7344
Script end 0.1521  1,394.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00332.1667200.0002
Check MTime0.00140.9095200.0001
Mysql Total
Database connection0.00070.454310.0007
Mysqli_queries0.106169.69331410.0008
Looping result0.00120.81431390.0000
Template Total0.140792.410.1407
Template load0.00150.980910.0015
Template processing0.139291.379010.1392
Override
Cache load0.00060.424710.0006
Sytem overhead
Fetch class attribute can translate value0.00110.694010.0011
XML
Image XML parsing0.00030.191010.0003
General
dbfile0.00764.9604200.0004
String conversion0.00000.004130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs