Skip to content

Commit

Permalink
Update changeholders.php
Browse files Browse the repository at this point in the history
  • Loading branch information
borazslo committed Feb 24, 2021
1 parent ec73c83 commit c5a307d
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions classes/html/church/changeholders.php
Expand Up @@ -14,17 +14,25 @@ public function __construct($path) {
$where['church_id'] = \Request::IntegerRequired('tid');
}

$where['user_id'] = \Request::IntegerRequired('uid');
$where['user_id'] = \Request::Integer('uid');
$confirmation = \Request::Simpletext('confirmation');

if(!$where['user_id']) {
if($confirmation) {
// Boldogok vagyunk
return;
} else {
throw new \Exception("Required 'uid' is required.");
}
}

$data['status'] = \Request::InArrayRequired('access', ['allowed','denied','revoked','asked']);
$description = \Request::Text('description');
if($description != '') {
$data['description'] = $description;
}

$confirmation = \Request::Simpletext('confirmation');

global $user;

global $user;
if ( $user->uid == $where['user_id'] AND $data['status'] == 'asked' ) {

if($confirmation == 'needed') {
Expand All @@ -50,20 +58,10 @@ public function __construct($path) {
return $this->redirect('/templom/'.$where['church_id'].'/edit');

} else {
if($confirmation == 'needed') {

} else {


throw new \Exception('Hiányzó jogosultság');

}
}







}

}
Expand Down

0 comments on commit c5a307d

Please sign in to comment.