Archived
1
0

Automatically crop uploaded profile pictures (fix #10) and migrate profile editing page to Bootstrap 4 (fix #8). General improvements to the process of profile editing

This commit is contained in:
KingOfDog
2018-10-23 22:22:22 +02:00
parent 2b5632fe95
commit 0ea56d1292
5 changed files with 1805 additions and 1757 deletions

View File

@@ -69,6 +69,20 @@ class LoginModel extends CI_Model
}
}
public function reloadLoginSession($logindata) {
$_SESSION['user']['displayname'] = $logindata['displayname'];
$_SESSION['user']['username'] = $logindata['username'];
$_SESSION['user']['rank'] = $logindata['rank'];
$_SESSION['user']['ID'] = $logindata['ID'];
$_SESSION['user']['ads'] = $logindata['showAds'];
$profilePic = $logindata['profile_picture'];
if (empty($profilePic)) {
$_SESSION['user']['profilePic'] = '/assets/images/steam.jpg';
} else {
$_SESSION['user']['profilePic'] = $profilePic;
}
}
public function getUserHash($username, $password, $email, $id)
{
$hash = hash('sha256', $id . '//' . $username . '//' . substr($password, 0, 5) . '//' . substr($email, 0, 5));