Forums / General / Possible to login by sending username and password in url?

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.

eZ debug

Timing: Jan 19 2025 11:43:53
Script start
Timing: Jan 19 2025 11:43:53
Module start 'content'
Timing: Jan 19 2025 11:43:53
Module end 'content'
Timing: Jan 19 2025 11:43:53
Script end

Main resources:

Total runtime0.1953 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.0069 589.2031180.8047
Module start 'content' 0.00690.0052 770.007893.9453
Module end 'content' 0.01200.1832 863.9531521.9219
Script end 0.1953  1,385.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00351.7725200.0002
Check MTime0.00130.6857200.0001
Mysql Total
Database connection0.00080.397810.0008
Mysqli_queries0.146274.82821410.0010
Looping result0.00180.92581390.0000
Template Total0.182993.710.1829
Template load0.00090.445410.0009
Template processing0.182193.207510.1821
Override
Cache load0.00060.312810.0006
Sytem overhead
Fetch class attribute can translate value0.00100.496710.0010
XML
Image XML parsing0.00030.135710.0003
General
dbfile0.00311.5721200.0002
String conversion0.00000.003130.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.0002 secs