Changeset 22 for trunk/Base/User.php


Ignore:
Timestamp:
Mar 1, 2010, 9:12:44 PM (14 years ago)
Author:
george
Message:
  • Přidáno: Skript pro import ze databáze centrály.
  • Přidáno: Zprovozněno přihalšování a odhlašování uživatelů, prohlížení a změna profilu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Base/User.php

    r16 r22  
    3333  {
    3434    $DbResult = $this->System->Database->select('User', 'Id', 'Name="'.$Name.
    35       '" AND Password=SHA1(CONCAT("'.$Password.'", Salt))');
     35      '" AND Password=SHA1(CONCAT(SHA1("'.$Password.'"), Salt))');
    3636    if($DbResult->num_rows > 0)
    3737    {
     
    4646    $Salt = GetPasswordSalt();
    4747    $this->System->Database->insert('User', array('Name' => '"'.$Name.'"',
    48       'Salt' => '"'.$Salt.'"', 'Password' => 'SHA1(CONCAT("'.$Password.'", "'.$Salt.'"))',
     48      'Salt' => '"'.$Salt.'"', 'Password' => 'SHA1(CONCAT(SHA1("'.$Password.'"), "'.$Salt.'"))',
    4949      'Email' => '"'.$Email.'"', 'RegistrationTime' => 'NOW()'));
    5050  }
Note: See TracChangeset for help on using the changeset viewer.