Source for file changeprofile.php

Documentation is available at changeprofile.php

  1. <?php
  2. /**
  3.  * R.E. Login 2.0 - Profil változtatás - includes/changeprofile.php
  4.  *
  5.  * Profil változtatás. Változók inicializálása.
  6.  * Folyamatok elindítása. <br />
  7.  * <br />
  8.  * <b>Dátum:</b> 2010.04.02.
  9.  *
  10.  * <b>Szerző weboldala:</b> {@link http://rimelek.hu/}<br />
  11.  * <b>Login weblapja:</b> {@link http://rimelek.hu/meghivos-loginrendszer-r-e-login-v2-0 R.E. Login v2.0}
  12.  *
  13.  * @author Takács Ákos (Rimelek), programmer [at] rimelek [dot] hu
  14.  * @copyright Copyright (C) 2010, Takács Ákos
  15.  * @license http://www.gnu.org/licenses/gpl.html
  16.  * @package RELogin
  17.  * @version 2.0
  18.  */
  19.  
  20. if(!class_exists('System'))
  21. {
  22.     exit('Ez a fajl nem erheto el kozvetlenul. Reszletek a readme.txt-ben.');
  23. }
  24.  
  25. /**
  26.  * @ignore
  27.  */
  28. require_once System::getIncLoginDir().'classes/ChangeProfile.class.php';
  29.  
  30. /**
  31.  * @ignore
  32.  */
  33. require_once System::getIncLoginDir().'classes/UserList.class.php';
  34.  
  35.  
  36. $msg "";
  37.  
  38. if System::$user->rank(array('admin','owner'))
  39.         and isset($_GET['uid'])
  40.         and UserList::exists('userid'$_GET['uid']))
  41. {
  42.     $user new User((int)$_GET['uid']);
  43. }
  44. if (empty($user->username))
  45. {
  46.     $user System::$user;
  47. }
  48. $profile $user;
  49. if (isset($_POST['profile']and is_array($_POST['profile']))
  50. {
  51.     $profile $_POST['profile'];
  52.  
  53.     if (!isset($profile['public_mail']or $profile['public_mail'== 'no')
  54.     {
  55.         $profile['public_mail''0';
  56.     }
  57.     else
  58.     {
  59.         $profile['public_mail''1';
  60.     }
  61.     if (ChangeProfile::request($_POST['profile'],$user))
  62.     {
  63.         $msg "Profil sikeresen módosítva!";
  64.         if ($user->T_users_useremail != $user->T_profiles_useremail)
  65.         {
  66.             $msg .= "Most újra aktiválnod kell az e-mail címed.<br />".PHP_EOL.
  67.                     "Az aktiváló linket elküldtük az új e-mail címedre.";
  68.         }
  69.     }
  70.     else
  71.     {
  72.         $msg implode('<br />'.PHP_EOL,ChangeProfile::errors());
  73.     }
  74. }
  75. foreach ($profile as $key => $value)
  76. {
  77.     //if ($key == 'useremail') continue;
  78.     $data[$keyhtmlspecialchars($value);
  79. }
  80. if (!isset($_POST['profile']))
  81. {
  82.     list($data['bdyear']$data['bdmonth']$data['bdday']explode('-',$data['birthdate']);
  83. }
  84. ?>

Documentation generated on Sun, 04 Apr 2010 22:43:31 +0200 by phpDocumentor 1.4.1