Save User language

Author Message

Julien Plesniak

Monday 10 December 2007 12:45:12 am

Hello,

I have a website (in ez 4.0) with 2 languages. I want that the user choose his language when he register. I want that when the user login, it was redirect to te correct siteaccess that he had choose.

How to do this?

Thanks for help

ps: sorry for my english

Julien Plesniak

Friday 14 December 2007 5:51:30 am

no idea?

André R.

Friday 14 December 2007 7:35:27 am

Add a drop down attribute on the user class, and create a custom login handler that redirects the user when he/she logs inn.

There are many ways to do this, this is just one.

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

Julien Plesniak

Thursday 20 December 2007 12:44:28 am

Hello, thanks André.

For the custom login, i have found this:

http://ez.no/ezpublish/documentation/configuration/configuration/login_handler/how_to_make_your_own_handler

In the function login, i can test variables of the user but the function return a boolean, so how to redirect to the correct website?

Thanks

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 04:23:41
Script start
Timing: Jan 18 2025 04:23:41
Module start 'layout'
Timing: Jan 18 2025 04:23:42
Module start 'content'
Timing: Jan 18 2025 04:23:42
Module end 'content'
Timing: Jan 18 2025 04:23:42
Script end

Main resources:

Total runtime0.7294 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 587.7969152.6094
Module start 'layout' 0.00570.0024 740.406339.4297
Module start 'content' 0.00810.7199 779.8359539.6719
Module end 'content' 0.72800.0014 1,319.507812.1875
Script end 0.7294  1,331.6953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4790160.0002
Check MTime0.00150.2028160.0001
Mysql Total
Database connection0.00060.084710.0006
Mysqli_queries0.682893.6049600.0114
Looping result0.00040.0607580.0000
Template Total0.701096.120.3505
Template load0.00230.318920.0012
Template processing0.698795.782120.3493
Template load and register function0.00010.014310.0001
states
state_id_array0.00100.133510.0010
state_identifier_array0.00060.085520.0003
Override
Cache load0.00190.2642200.0001
Sytem overhead
Fetch class attribute can translate value0.00050.066920.0002
Fetch class attribute name0.00100.137550.0002
XML
Image XML parsing0.00070.090920.0003
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00090.1205170.0001
String conversion0.00000.001240.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs