Changeset 419


Ignore:
Timestamp:
09/04/09 03:06:01 (15 years ago)
Author:
nanardon
Message:
  • make access to user's profile easier:
    • at login, the authenticated user's profil is show instead initial page
    • add link in main menu to user's profile and password form
Location:
LATMOS-Accounts-Web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Root.pm

    r229 r419  
    2929sub default : Private { 
    3030    my ( $self, $c ) = @_; 
    31  
     31    $c->res->redirect('/users/' . $c->user->{username}) if($c->user); 
    3232} 
    3333 
     
    4040                username => $c->req->param('username'), 
    4141                password => $c->req->param('password')})) { 
    42             $c->res->redirect($c->req->param('loguri') || '/'); 
     42            my $redirurl = $c->req->param('loguri') || '/'; 
     43            $redirurl = '/' if ($redirurl =~ m:^/login:); 
     44            $c->res->redirect($redirurl || '/'); 
    4345        } else { 
    4446            warn "invalid login"; 
  • LATMOS-Accounts-Web/root/html/includes/header.tt

    r272 r419  
    2222<div id="mainmenu" class="pmenu"> 
    2323    [% mainmenu %] 
     24<div style="float: right"> 
     25    <a href="[% c.uri_for('/users', c.user.username) %]"><span>Mon profile</span></a> 
     26    <a href="[% c.uri_for('/users', c.user.username, 'passwd') %]"><span>Changer 
     27    mon mot de passe</span></a> 
    2428</div> 
     29</div> 
Note: See TracChangeset for help on using the changeset viewer.