auth->getUser(); if($user && $user['type']!=$user::SENDER){ $this->error('You have no permission for sender'); }*/ } }