Dotclear


Ignore:
Timestamp:
11/17/13 20:25:53 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2567:6c11245cbf04, 2568:61c67a7d17fa
Message:

Add some people in CREDITS, remove trailing spaces and tabs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/auth.php

    r2311 r2566  
    8383     { 
    8484          $recover_key = $core->auth->setRecoverKey($user_id,$user_email); 
    85            
     85 
    8686          $subject = mail::B64Header('DotClear '.__('Password reset')); 
    8787          $message = 
     
    9090          __('To reset your password visit the following address, otherwise just ignore this email and nothing will happen.')."\n". 
    9191          $page_url.'?akey='.$recover_key; 
    92            
     92 
    9393          $headers[] = 'From: '.(defined('DC_ADMIN_MAILFROM') && DC_ADMIN_MAILFROM ? DC_ADMIN_MAILFROM : 'dotclear@local'); 
    9494          $headers[] = 'Content-Type: text/plain; charset=UTF-8;'; 
    95            
     95 
    9696          mail::sendMail($user_email,$subject,$message,$headers); 
    9797          $msg = sprintf(__('The e-mail was sent successfully to %s.'),$user_email); 
     
    108108     { 
    109109          $recover_res = $core->auth->recoverUserPassword($akey); 
    110            
     110 
    111111          $subject = mb_encode_mimeheader('DotClear '.__('Your new password'),'UTF-8','B'); 
    112112          $message = 
     
    114114          __('Password:').' '.$recover_res['new_pass']."\n\n". 
    115115          preg_replace('/\?(.*)$/','',$page_url); 
    116            
     116 
    117117          $headers[] = 'From: dotclear@'.$_SERVER['HTTP_HOST']; 
    118118          $headers[] = 'Content-Type: text/plain; charset=UTF-8;'; 
    119            
     119 
    120120          mail::sendMail($recover_res['user_email'],$subject,$message,$headers); 
    121121          $msg = __('Your new password is in your mailbox.'); 
     
    143143               throw new Exception(); 
    144144          } 
    145            
     145 
    146146     # Check login informations 
    147147     $check_user = false; 
     
    157157          } 
    158158     } 
    159       
     159 
    160160          if (!$core->auth->allowPassChange() || !$check_user) { 
    161161               $change_pwd = false; 
    162162               throw new Exception(); 
    163163          } 
    164            
     164 
    165165          if ($_POST['new_pwd'] != $_POST['new_pwd_c']) { 
    166166               throw new Exception(__("Passwords don't match")); 
    167167          } 
    168            
     168 
    169169          if ($core->auth->checkUser($user_id,$_POST['new_pwd']) === true) { 
    170170               throw new Exception(__("You didn't change your password.")); 
    171171          } 
    172            
     172 
    173173          $cur = $core->con->openCursor($core->prefix.'user'); 
    174174          $cur->user_change_pwd = 0; 
    175175          $cur->user_pwd = $_POST['new_pwd']; 
    176176          $core->updUser($core->auth->userID(),$cur); 
    177            
     177 
    178178          $core->session->start(); 
    179179          $_SESSION['sess_user_id'] = $user_id; 
    180180          $_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY); 
    181            
     181 
    182182          if ($data['user_remember']) 
    183183          { 
    184184               setcookie('dc_admin',$data['cookie_admin'],strtotime('+15 days'),'','',DC_ADMIN_SSL); 
    185185          } 
    186            
     186 
    187187          http::redirect('index.php'); 
    188188     } 
     
    202202          $check_perms = false; 
    203203     } 
    204       
     204 
    205205     $cookie_admin = http::browserUID(DC_MASTER_KEY.$user_id. 
    206206          crypt::hmac(DC_MASTER_KEY,$user_pwd)).bin2hex(pack('a32',$user_id)); 
    207       
     207 
    208208     if ($check_perms && $core->auth->mustChangePassword()) 
    209209     { 
     
    213213               empty($_POST['user_remember'])?'0':'1' 
    214214          )); 
    215            
     215 
    216216          if (!$core->auth->allowPassChange()) { 
    217217               $err = __('You have to change your password before you can login.'); 
     
    221221          } 
    222222     } 
    223      elseif ($check_perms && !empty($_POST['safe_mode']) && !$core->auth->isSuperAdmin())  
     223     elseif ($check_perms && !empty($_POST['safe_mode']) && !$core->auth->isSuperAdmin()) 
    224224     { 
    225225          $err = __('Safe Mode can only be used for super administrators.'); 
     
    230230          $_SESSION['sess_user_id'] = $user_id; 
    231231          $_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY); 
    232            
     232 
    233233          if (!empty($_POST['blog'])) { 
    234234               $_SESSION['sess_blog_id'] = $_POST['blog']; 
    235235          } 
    236            
     236 
    237237          if (!empty($_POST['safe_mode']) && $core->auth->isSuperAdmin()) { 
    238238               $_SESSION['sess_safe_mode'] = true; 
    239239          } 
    240            
     240 
    241241          if (!empty($_POST['user_remember'])) { 
    242242               setcookie('dc_admin',$cookie_admin,strtotime('+15 days'),'','',DC_ADMIN_SSL); 
    243243          } 
    244            
     244 
    245245          http::redirect('index.php'); 
    246246     } 
     
    280280  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> 
    281281 
    282    
     282 
    283283<?php 
    284284echo dcPage::jsLoadIE7(); 
    285285echo dcPage::jsCommon(); 
    286286?> 
    287    
     287 
    288288     <link rel="stylesheet" href="style/default.css" type="text/css" media="screen" /> 
    289        
     289 
    290290  <?php 
    291291  # --BEHAVIOR-- loginPageHTMLHead 
    292292  $core->callBehavior('loginPageHTMLHead'); 
    293293  ?> 
    294    
     294 
    295295  <script type="text/javascript"> 
    296296  //<![CDATA[ 
     
    299299    var upw = $('input[name=user_pwd]'); 
    300300    uid.focus(); 
    301      
     301 
    302302    if (upw.length == 0) { return; } 
    303      
     303 
    304304    uid.keypress(processKey); 
    305305 
     
    347347     '<p><label for="user_id">'.__('Username:').'</label> '. 
    348348     form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id)).'</p>'. 
    349       
     349 
    350350     '<p><label for="user_email">'.__('Email:').'</label> '. 
    351351     form::field(array('user_email','user_email'),20,255,html::escapeHTML($user_email)).'</p>'. 
    352       
     352 
    353353     '<p><input type="submit" value="'.__('recover').'" />'. 
    354354     form::hidden(array('recover'),1).'</p>'. 
    355355     '</div>'. 
    356       
     356 
    357357     '<div id="issue">'. 
    358358     '<p><a href="auth.php">'.__('Back to login screen').'</a></p>'. 
     
    365365     '<p><label for="new_pwd">'.__('New password:').'</label> '. 
    366366     form::password(array('new_pwd','new_pwd'),20,255).'</p>'. 
    367       
     367 
    368368     '<p><label for="new_pwd_c">'.__('Confirm password:').'</label> '. 
    369369     form::password(array('new_pwd_c','new_pwd_c'),20,255).'</p>'. 
    370370     '</div>'. 
    371       
     371 
    372372     '<p><input type="submit" value="'.__('change').'" />'. 
    373373     form::hidden('login_data',$login_data).'</p>'; 
     
    384384               echo '<div class="fieldset">'; 
    385385               echo '<h2>'.__('Safe mode login').'</h2>'; 
    386                echo  
     386               echo 
    387387                    '<p class="form-note">'. 
    388388                    __('This mode allows you to login without activating any of your plugins. This may be useful to solve compatibility problems').'&nbsp;</p>'. 
     
    397397          '<p><label for="user_id">'.__('Username:').'</label> '. 
    398398          form::field(array('user_id','user_id'),20,32,html::escapeHTML($user_id)).'</p>'. 
    399            
     399 
    400400          '<p><label for="user_pwd">'.__('Password:').'</label> '. 
    401401          form::password(array('user_pwd','user_pwd'),20,255).'</p>'. 
    402            
     402 
    403403          '<p>'. 
    404404          form::checkbox(array('user_remember','user_remember'),1). 
    405405          '<label for="user_remember" class="classic">'. 
    406406          __('Remember my ID on this computer').'</label></p>'. 
    407            
     407 
    408408          '<p><input type="submit" value="'.__('log in').'" class="login" /></p>'; 
    409            
     409 
    410410          if (!empty($_REQUEST['blog'])) { 
    411411               echo form::hidden('blog',html::escapeHTML($_REQUEST['blog'])); 
    412412          } 
    413413          if($safe_mode) { 
    414                echo  
     414               echo 
    415415               form::hidden('safe_mode',1). 
    416416               '</div>'; 
     
    423423 
    424424          echo '<div id="issue">'; 
    425            
     425 
    426426          if ($safe_mode) { 
    427427               echo 
     
    434434               echo '<p><a href="auth.php?safe_mode=1" id="safe_mode_link">'.__('I want to log in in safe mode').'</a></p>'; 
    435435          } 
    436            
     436 
    437437          echo '</div>'; 
    438438     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map