public function update($userId)
{
try {
$permissions = Input::get('permissions', array());
$this->users->updatePermissions($userId, $permissions);
return Redirect::route('cpanel.users.index')->with('success', Lang::get('cpanel::users.permissions_update_success'));
} catch (UserNotFoundException $e) {
return Redirect::route('cpanel.users.permissions')->with('error', $e->getMessage());
}
}