Skip to content

Commit b1e1e5e

Browse files
committed
Unset password for admin and user components
1 parent 4136010 commit b1e1e5e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/component/admin.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ class Admin extends ComponentBase {
3737
protected $options = [];
3838

3939
public $cacheExpire = 0; //seconds
40-
40+
/*
4141
function cacheKey() {
4242
//disable caching
4343
return false;
4444
}
45-
45+
*/
4646
function results() {
4747
if ($this->options['admin_id'] || $this->options['username']) {
4848
$admins = new \Vvveb\Sql\AdminSQL();
@@ -53,6 +53,8 @@ function results() {
5353
}
5454

5555
if ($results) {
56+
unset($results['password'], $results['token']);
57+
5658
if (isset($results['avatar'])) {
5759
$results['avatar_url'] = Images::image($results['avatar'], 'admin');
5860
}

app/component/user.php

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ function results() {
5353
}
5454

5555
if ($results) {
56+
unset($results['password'], $results['token']);
57+
5658
if (isset($results['avatar'])) {
5759
$results['avatar_url'] = Images::image($results['avatar'], 'user');
5860
}

0 commit comments

Comments
 (0)