Possible to login by sending username and password in url?

Author Message

Espen R

Thursday 29 November 2007 7:53:41 am

Is this at all possible with eZ or does the user have to type in username and password as the only way of logging in?

Please help.

Thanks.

Paul Leclercq

Thursday 29 November 2007 9:42:29 am

You can loggin users by using the eZpublish API:

http://pubsvn.ez.no/doxygen/trunk/html/classeZUser.html

you have a the following static function:
static loginUser ($login, $password, $authenticationMatch=false)

which you can use with other functions such as:

$user = eZUser::getByEmail($email);
or
$user = eZUser::getByName($login);

This way you will be able to force login from a number of events such as via a get, cookie or Session event.
If you match this with the SingleSignOnArray[]= setting from the site.ini file, you can force login for users with cookie events, and interface your login event with other applications or partner websites.

But if you use the forceLogin or cookie methods make sure you check the security issues involved.

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 19 2025 11:36:36
Script start
Timing: Jan 19 2025 11:36:36
Module start 'layout'
Timing: Jan 19 2025 11:36:36
Module start 'content'
Timing: Jan 19 2025 11:36:37
Module end 'content'
Timing: Jan 19 2025 11:36:37
Script end

Main resources:

Total runtime1.2754 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.4063152.6563
Module start 'layout' 0.00610.0042 742.062539.5078
Module start 'content' 0.01031.2635 781.5703500.7891
Module end 'content' 1.27380.0016 1,282.35948.0938
Script end 1.2754  1,290.4531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2602160.0002
Check MTime0.00140.1067160.0001
Mysql Total
Database connection0.00060.050310.0006
Mysqli_queries1.222195.8204540.0226
Looping result0.00050.0420520.0000
Template Total1.234396.820.6172
Template load0.00210.166720.0011
Template processing1.232196.605620.6161
Template load and register function0.00010.010410.0001
states
state_id_array0.00090.072510.0009
state_identifier_array0.00090.068720.0004
Override
Cache load0.00170.1347200.0001
Sytem overhead
Fetch class attribute can translate value0.00080.058920.0004
Fetch class attribute name0.00120.096640.0003
XML
Image XML parsing0.00470.366920.0023
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00600.4736210.0003
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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs