Changeset 29 for trunk/www/user.php
- Timestamp:
- Jun 13, 2009, 9:36:51 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/user.php
r22 r29 102 102 else 103 103 { 104 $this->Database->insert('User', array('Name' => $Name, 'Login' => $Login, 'Password' => $Password, 'Email' => $Email, 'RegistrationTime' => 'NOW()', 'Locked' => 1, 'Role' => 2));104 $this->Database->insert('User', array('Name' => $Name, 'Login' => $Login, 'Password' => sha1($Password), 'Email' => $Email, 'RegistrationTime' => 'NOW()', 'Locked' => 1, 'Role' => 2)); 105 105 $UserId = $this->Database->insert_id; 106 106 107 107 $Subject = FromUTF8('Registrace nového účtu', 'iso2'); 108 $Message = 'Provedli jste registraci nového účtu na serveru <a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/">http://'.$Config['Web']['Host'].$Config['Web']['RootFolder']."/</a>.<br>\nPokud jste tak neučinili, měli by jste tento email ignorovat.<br><br>\n\nVáš účet je: ".$Login."\n<br>Pro dokončení registrace klikněte na tento odkaz: ".'<a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=UserRegisterConfirm&User='.$UserId.'&H='. $Password.'">http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=UserRegisterConfirm&User='.$UserId.'&H='.$Password.'</a>.'."\n<br> \n\n<br><br>Na tento email neodpovídejte.";108 $Message = 'Provedli jste registraci nového účtu na serveru <a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/">http://'.$Config['Web']['Host'].$Config['Web']['RootFolder']."/</a>.<br>\nPokud jste tak neučinili, měli by jste tento email ignorovat.<br><br>\n\nVáš účet je: ".$Login."\n<br>Pro dokončení registrace klikněte na tento odkaz: ".'<a href="http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=UserRegisterConfirm&User='.$UserId.'&H='.sha1($Password).'">http://'.$Config['Web']['Host'].$Config['Web']['RootFolder'].'/?Action=UserRegisterConfirm&User='.$UserId.'&H='.sha1($Password).'</a>.'."\n<br> \n\n<br><br>Na tento email neodpovídejte."; 109 109 $AdditionalHeaders = "To: ".$Name." <".$Email.">\n"."From: ".FromUTF8($Config['Web']['Title'], 'iso2')." <noreplay@zdechov.net>\n"."MIME-Version: 1.0\n"."Content-type: text/html; charset=utf-8"; 110 110 mail($Email, $Subject, $Message, $AdditionalHeaders); … … 141 141 { 142 142 $Row = $Query->fetch_assoc(); 143 if($Row['Password'] != $Password) $Result = BAD_PASSWORD;143 if($Row['Password'] != sha1($Password)) $Result = BAD_PASSWORD; 144 144 else if($Row['Locked'] == 1) $Result = ACCOUNT_LOCKED; 145 145 else
Note:
See TracChangeset
for help on using the changeset viewer.